Thread: vc++ source codes

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    31

    vc++ source codes

    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?

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Could be, or you could be doing smth else wrong...

  3. #3
    Unregistered
    Guest
    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.
    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;
    }
    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.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    31
    ok but what does using namespace std; mean?

  5. #5
    Registered User larry's Avatar
    Join Date
    Sep 2001
    Posts
    96
    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...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to build, run Boland C++ 6 source file via VS2005?
    By userpingz in forum C++ Programming
    Replies: 2
    Last Post: 05-21-2009, 03:25 AM
  2. Source codes
    By geek@02 in forum Windows Programming
    Replies: 2
    Last Post: 10-22-2006, 01:54 PM
  3. Open Source Licenses
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 10-10-2006, 08:53 PM
  4. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 09:40 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM