Thread: Real Noob question

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    3

    Question Real Noob question

    Hey all,

    I'm new to programming..well actually I did some BASIC in HS back in '82 before GUI's even really existed. Anyway, my question is quite simple (I hope)

    I got a copy of Visual C++ 2005 Express. I made a really simple program just to say hey. It runs just fine on the compiler, no errors or anything. My only question is...How do I turn my code into an executable program? I been all over theese boards and at leat found out it's a process called linking, but beyond that i'm stumpted. When y'all get done pointing and laughing ( I know this is rediculously newbish) any help would be greatly appreciated.

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    If you've "run it fine" within the IDE (not the compiler) then you've already got yourself an executable file... it's just a matter of finding it. You should look in your project folder location for a debug or release folder... your executable will be inside.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    /laughs
    /points

  4. #4
    Registered User
    Join Date
    Sep 2007
    Posts
    3
    Apperently i'm running it with the compiler. I found the exe file, but when I try to run it i get an error saying the configuration is wrong. If there is a link or thread to point me to compiler use, or any other advice it would be greatly appreciated...as the the advice i've gotten already I say that cause i'm not even sure how to run it within the IDE or what it really is.

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    Did you make a standard C++ program, or are you using .NET?

    When you first create your project, you want to create a Win32 Console Application, then check Empty Project on the Application Settings page of the wizard. If you do that, then you can write standard C++ code that isn't dependent on .NET. If you still have the problem it might be due to not being able to find the proper CRT dlls.

    If you did something else, then you might be using C++/CLI, in which case there are other issues involved that I'm not familiar with.

  6. #6
    Registered User
    Join Date
    Sep 2007
    Posts
    3
    I found my exacutable (yaay) I do think i'm missing something however, as it runs just fine on this machine, but when i put it on my usb diver and try it on anohter machine, i get an error sayin the program is configured incorrectly on xp, on vista i get a side by side error. Yes Daved, i checked the empty project box in the settings wizard. Thank y'all for the help. Now I get to find out what's missing In case any are curious, here is the program

    #include <iostream>

    using namespace std;

    int main()
    {
    cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
    cin.get();
    }

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Probably the debug versions of some libraries. Compile the program in release mode and try that version.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    and return 0;

  9. #9
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    Also make sure you either statically link to the runtime library, or use the dll version and copy the msvcrt80.dll (I think that's the name) file with your program.


    >> and return 0;
    That's done automatically for main, so it's the same either way.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. quick noob question
    By thanatos1 in forum C# Programming
    Replies: 2
    Last Post: 06-17-2009, 08:28 PM
  2. another noob question
    By clb2003 in forum C Programming
    Replies: 4
    Last Post: 02-12-2009, 01:28 PM
  3. Noob printf question
    By lolguy in forum C Programming
    Replies: 3
    Last Post: 12-14-2008, 08:08 PM
  4. What's the real question?
    By Salem in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 07-18-2007, 08:32 PM
  5. Noob question (redeclaring a array)
    By Demon.killer in forum C Programming
    Replies: 8
    Last Post: 10-21-2006, 12:06 PM