
-----------------------------------
Andy
Thu Feb 24, 2005 10:11 pm

Microsoft Visual Studio .Net 2003
-----------------------------------
hmm i recently acquired a copy of vsn2003 and i was very confused by the ide... i've been a vc6 user for quite some time.. i was just wondering if anyone knew what #include "stdafx.h" is for.. it seems that if i dont have that my programs in console app wont work...

-----------------------------------
wtd
Thu Feb 24, 2005 10:34 pm


-----------------------------------
Show me your code.  Anything console based should be easily possible in standard C++.

-----------------------------------
Andy
Thu Feb 24, 2005 10:36 pm


-----------------------------------
i was simply doing some vector stuff

// vector_push_back.cpp
// compile with: /EHsc
#include "stdafx.h"
#include 
#include 
#include 
using namespace std;   

int main( )
{
   vector  v1,v2;
   v2.push_back(6);
   v2.push_back(7);
   v1.push_back(1);
   v1.push_back(3);
   v1.push_back(2);
   v1.push_back( 0);
   v1.push_back(5);
   v1.push_back(4);
   
   v1.insert(v1.begin(),v2.begin(),v2.end());

   //sort(v1.begin(),v1.end());
   v1.erase(v1.begin()+3,v1.begin()+4);

   for (int i=0;iright click on the source files folder->add new item; select the cpp file, and voila.

I prefer using the solution explorer view over the class view because I usually put each class or group of very similar classes in one file, so just having a list of files is makes it much easier to edit code.

-----------------------------------
Andy
Sun Feb 27, 2005 8:22 pm


-----------------------------------
wow.. i've been looking all over for that solution explorer.. thanks so much

-----------------------------------
bugzpodder
Sun Feb 27, 2005 8:44 pm


-----------------------------------
alternatively, you could use reverse(v.begin(),v.end()); to reverse the list after you sort it in ascending order.

-----------------------------------
Andy
Sun Feb 27, 2005 9:06 pm


-----------------------------------
wow.. that is awesome.. thx bugz +20 bits

-----------------------------------
wtd
Sun Feb 27, 2005 10:52 pm


-----------------------------------
YESYESYESYESYES!!!! thank you sooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo much... btw, now i have another problem... after i disabled that thing, when ever i start an empty console application, i have to make a new source file, save it in the folder, then move it into the project... does anyone know an easier way?

Use GCC and learn standard C++?

No, seriously, you're learning how to be Microsoft's b****, not how to write good, standard C++ programs.

-----------------------------------
Andy
Mon Feb 28, 2005 8:18 am


-----------------------------------
once i get my laptop, i think im gona lookin GCC more since i'll be running an ubuntu/xp dualboot... i guess there really is nothing wrong with learning msvc... plus, the compiler is alot better than the vc6 one...

-----------------------------------
Mazer
Mon Feb 28, 2005 8:21 am


-----------------------------------
I find it easier to work with a nice and simple (preferably tabbed) text editor and using makefiles.
