Where can I find VC++ source codes. 90% of the time when I run a source code it doesn't work. Could it be that it was written on a different compiler?
Where can I find VC++ source codes. 90% of the time when I run a source code it doesn't work. Could it be that it was written on a different compiler?
Could be, or you could be doing smth else wrong...
-Govtcheez
[email protected]
If the source code includes header files or other files, like class implementation files, not included with the code you're running, it won't compile properly.
To actually compile this code, you also need the file someClass.h and any implementation file that goes with it, such as someClass.cpp. Compile them all together. Otherwise main is looking for stuff it doesn't have.Code:#include "someClass.h" // need this actual file to compile #include <iostream> using namespace std; int main() { someClass x; // declare variable x of class someClass cout << x; // print x return 0; }
ok but what does using namespace std; mean?
Search C++ Programming section of the board. There is a thread asking this (using namespace std) and there goes sufficient explanation with it.
Please excuse my poor english...