Jump to content




Recent Status Updates

  • Photo
      18 Aug
    KodeKool

    When faced with a wall of errors and no hope to fix them, remember the following "Programs always do what you tell them to, and seldom what you want them to, but eventually you'll run out of things that can go wrong and it'll just work. and that's the secret to good programming."

    Show comments (2)
View All Updates

Developed by Kemal Taskin
Photo
- - - - -

Beginner in C++!How to compile using visual studio 2010 express


  • Please log in to reply
5 replies to this topic

#1 charlote

charlote

    CC Regular

  • Member
  • PipPipPip
  • 37 posts

Posted 10 December 2010 - 06:23 AM

I am new to C++ and been trying to do small program. I created the source code and when I try to compile the program, it gives the following message:

unable to start program 'C:\users\...\visual studio 2010\projects\basic.cpp\Debug\basic.cpp.exe.

The system cannot find the file specified.

Can anyone tell me what I am doing wrong?
  • 0

#2 mnirahd

mnirahd

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 328 posts

Posted 10 December 2010 - 09:34 AM

Hi,

Its hard to tell using the information you have provided. What's the name of project you created: Are you sure you selected correct project type while creating it. I assume you're trying to create a console based application. Are you sure that you select win32 console when you created project?

Munir
  • 0

#3 Ancient Dragon

Ancient Dragon

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 378 posts

Posted 10 December 2010 - 10:08 AM

Here are some tutorials how to use that compiler and IDE
  • 0
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.

#4 charlote

charlote

    CC Regular

  • Member
  • PipPipPip
  • 37 posts

Posted 10 December 2010 - 10:20 AM

Hi,

Its hard to tell using the information you have provided. What's the name of project you created: Are you sure you selected correct project type while creating it. I assume you're trying to create a console based application. Are you sure that you select win32 console when you created project?

Munir


I am sorry. It is a console based application. Project name is basic.cpp(it is just a basic to get started). I did select win32 console when I created it. but still it gives the message... as program unable to start

Thanks
  • 0

#5 Muted

Muted

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 80 posts

Posted 10 December 2010 - 11:02 AM

I am sorry. It is a console based application. Project name is basic.cpp(it is just a basic to get started). I did select win32 console when I created it. but still it gives the message... as program unable to start

Thanks

Hello, charlote.

Here's a basic walk-through to create a new Win32 console project with MSVC 10 Express:

  • Open Microsoft Visual C++ Express 10
  • Click on "File" (upper left) -> New -> Project
  • Select "Win32 Console Application"
  • On the bottom side of the window, type in your projects name as "Example" (so it will be -- Name: Example)
    For me, the project location is: C:\Documents and Settings\Muted\My Documents\Visual Studio 2010\Projects
  • Click "OK"
  • Click "Next"
  • Select "Console Application" as the application-type
  • UNcheck "pre-compiled headers"
  • CHECK "Empty project"
  • Click "Finish"
  • In the left pane, right click on "Source Files" -> Add -> New Item... -> "C++ File"
  • Name: example.cpp
  • Click on "Add" (lower right corner)
  • Enter the source code (shown below...)
  • Press F7 (build hotkey)
  • Press F5 (run "debug" hotkey)


SOURCE CODE:
#include <iostream>

int main() {

    std::cout << "Hello World!";

    char holdExecutionWindowOpen;
    std::cin >> holdExecutionWindowOpen;

    return 0;
}

There you go! Hope this helps! :c-smile:
  • 0
“You may be disappointed if you fail, but you are doomed if you don't try.”
- Beverly Sills

#6 charlote

charlote

    CC Regular

  • Member
  • PipPipPip
  • 37 posts

Posted 10 December 2010 - 11:14 AM

Here are some tutorials how to use that compiler and IDE


Thanks, It is very helpful.
  • 0