MS Visual C++ Opening Main.c?

Discussion in 'OT Technology' started by CXHatchback, Feb 12, 2003.

  1. CXHatchback

    CXHatchback Guest

    Ok, I'm still new to C programming but I'm trying to do my homework in C class using visual C++ 6.0. It's nothing like Metroworks CodeWarrior that i was using apparently, but I'd rather use visual since that's what we use in teh help lab at school.

    So can anyone tell me how the hell I begin to write a project? I just have some simple homework programs I'd like to make and I can't figure out what I need to open/create/add in terms of workspaces/stationarys/projects/etc.

    I just can't figure it out. TIA
     
  2. Nocera

    Nocera ...

    Joined:
    Aug 9, 2000
    Messages:
    1,307
    Likes Received:
    0
    Location:
    Long Island, NY
    If it's just a simple console app, click on the "new source file" icon (white paper icon in the toolbar). Write the code. Save it as main.c in a project directory. Build/Compile. It will ask you to add it to a workspace. Click yes and it will make the workspace and compile.
     
  3. CXHatchback

    CXHatchback Guest

    THat seems to open a text file so I can't use that, or save is as .c

    I tried opening a win32 console app and it appeared to work, I finally got a place where I can enter code and try to run it, but when I press rebuild I get a bunch of errors. Keep in mind a copy/pasted from my other compiler where i know the program should work.
     
  4. Nocera

    Nocera ...

    Joined:
    Aug 9, 2000
    Messages:
    1,307
    Likes Received:
    0
    Location:
    Long Island, NY
    Yes you can... Just remove the .txt extension in the save dialog and replace it with .c. Then do a build/compile.

    If you're getting compiler errors, post the code.
     
  5. CXHatchback

    CXHatchback Guest

    Alright well I got it to work finally, but I'm still using my old compiler since I don't understand what file/project/workspace I actually have open and how I would go about reopening it.
     

Share This Page