locked
Hello World in C++ RRS feed

  • Question

  • I just started using Microsoft Visual C++ 2010 and I'm already stuck on Hello World. It's not so much a coding thing as the compiler not letting me debug when I'm trying to run the program. If somebody knows what I'm doing wrong please correct me. If you still need some more details I can explain further. Thanks!
    • Moved by Sean Jenkin Thursday, July 7, 2011 6:34 PM (From:MSDN, TechNet, and Expression Profile and Recognition System Discussions)
    Wednesday, July 6, 2011 10:05 PM

Answers

  • Hi,

     

    Welcome to MSDN forum and thank you for your posting. I’m Rob Pan,  the MSDN support engineer. I’m glad to help you to solve this issue.

     

    From your description, I notice the issue you want to start a program with visual studio. Could you please give us more detail about your issue? Such as the error message.

     

    Please  follow these steps which could help you to complete a  program:

    1. On the  File menu, point to New, then click Project which kind of  you want to create.

    2.Enter a project name, click OK and complete the configuration.

    3.Right-click on the Source Files folder in the Solution Explorer and point to Add and click New Item. If the Solution Explorer is not visible,  click Solution Explorer on the View menu.

    4.Click one kind of C++ files for the Dialog to add into you project.

    5.Input some codes in your C++ files like “hello world”. You may reference this topic:

    http://social.msdn.microsoft.com/Forums/en/Vsexpressvc/thread/6196a0f1-6314-4a61-8881-90b02ad77d52.Click Build Solution or F7.

    6.If there is  no any error, Click Start Debugging on the  Debug menu, or use F5 to run the project.

     

    In addition, here are some useful suggestions for you:

    1. http://msdn.microsoft.com/en-us/library/ms235629(VS.80).aspx

    2. http://msdn.microsoft.com/en-us/library/bb384838.aspx

     

    I hope my suggestion will help you to solve your issue. If anything is unclear, please feel free to let me know.

     

     

    Best Regards,

    Rob

     

     


    Rob Pan [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by SA PRE Monday, July 11, 2011 8:14 AM
    • Marked as answer by Rob Pan Monday, July 11, 2011 8:34 AM
    Friday, July 8, 2011 7:39 AM

All replies

  • Hi clien,

    while debugging where are you getting error? or can you tell what type of error are you getting?

    Thursday, July 7, 2011 10:41 AM
  • Hi,

     

    Welcome to MSDN forum and thank you for your posting. I’m Rob Pan,  the MSDN support engineer. I’m glad to help you to solve this issue.

     

    From your description, I notice the issue you want to start a program with visual studio. Could you please give us more detail about your issue? Such as the error message.

     

    Please  follow these steps which could help you to complete a  program:

    1. On the  File menu, point to New, then click Project which kind of  you want to create.

    2.Enter a project name, click OK and complete the configuration.

    3.Right-click on the Source Files folder in the Solution Explorer and point to Add and click New Item. If the Solution Explorer is not visible,  click Solution Explorer on the View menu.

    4.Click one kind of C++ files for the Dialog to add into you project.

    5.Input some codes in your C++ files like “hello world”. You may reference this topic:

    http://social.msdn.microsoft.com/Forums/en/Vsexpressvc/thread/6196a0f1-6314-4a61-8881-90b02ad77d52.Click Build Solution or F7.

    6.If there is  no any error, Click Start Debugging on the  Debug menu, or use F5 to run the project.

     

    In addition, here are some useful suggestions for you:

    1. http://msdn.microsoft.com/en-us/library/ms235629(VS.80).aspx

    2. http://msdn.microsoft.com/en-us/library/bb384838.aspx

     

    I hope my suggestion will help you to solve your issue. If anything is unclear, please feel free to let me know.

     

     

    Best Regards,

    Rob

     

     


    Rob Pan [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by SA PRE Monday, July 11, 2011 8:14 AM
    • Marked as answer by Rob Pan Monday, July 11, 2011 8:34 AM
    Friday, July 8, 2011 7:39 AM
  • IF you have installed properly, you should be able to run successfully.  IF you run using F5, you might not able to see the console window. You should run using Ctrl + F5 for see the console window.

     

    If you want debug the application, you have to change the configuration to Debug. You can check the following link for change configuration

    http://msdn.microsoft.com/en-us/library/wx0123s5.aspx

     

    The following code project article also helps for understand debug in VS2010

    http://www.codeproject.com/KB/cs/MasteringInDebugging.aspx

     

     


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    Friday, July 8, 2011 8:26 AM