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?
Beginner in C++!How to compile using visual studio 2010 express
Started by charlote, Dec 10 2010 06:23 AM
5 replies to this topic
#1
Posted 10 December 2010 - 06:23 AM
|
|
|
#2
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
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
#3
Posted 10 December 2010 - 10:08 AM
Hereare some tutorials how to use that compiler and IDE
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.
#4
Posted 10 December 2010 - 10:20 AM
mnirahd said:
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
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
#5
Posted 10 December 2010 - 11:02 AM
charlote said:
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
Thanks
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:
“You may be disappointed if you fail, but you are doomed if you don't try.”
- Beverly Sills
- Beverly Sills
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









