Thread: C code in Visual C++

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    2

    C code in Visual C++

    Help a newbie out,

    Let's say somebody learned some C in college 6 some odd years ago and now wants to get back into it as a hobby. If I'm using Visual C++ as a compiler do I go ahead and design the GUI's like any MFC application and just use regular C code in place of C++? Would that mean leaving things alone like preprocessor directives to include either stdio.h or iostream.h? What do I have to look out for when using Visual C++ for writing C Windows apps?

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    MFC is C++ only. If you want to use C for Windows Apps, you're gonna need to use WinAPI. All you have to do to make MSVC++ compile your app as C instead of C++ is to name your files whatever.c.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    70
    Yes....you can do it with creating application using "Win32 Console Application".

    And if you want to windows application using 'C', I think you must have to take knowledge of Window's programming. I mean the structure of Window's application and how it works.
    Chintan R Naik

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. compiling C code at visual C++ 6.0
    By hattusili in forum C Programming
    Replies: 7
    Last Post: 02-10-2008, 01:26 PM
  2. MS Visual C++ 6 wont include vector.h in a header file
    By bardsley99 in forum C++ Programming
    Replies: 9
    Last Post: 11-06-2003, 12:05 PM
  3. Weird errors in code
    By sirSolarius in forum C++ Programming
    Replies: 6
    Last Post: 09-28-2003, 09:55 AM
  4. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 05:27 AM
  5. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 12:06 AM