30 Minutes New :)

Hi Guys!

Glad to be here, I am interested in the world of programming and I believe I have found a good forum to help me. This is probably the noobiest question you will get, but after this I believe I should be fine for a while.

I honestly don't know if this is an IDE or a Compiler, but I am using: Microsoft Visual C++ 2010 Express

If it isn't any recommendations on what to use is highly appreciated.

My last question.. (please don't laugh) I have a little program I've created from the guide I was reading here. The only problem is I can't seem to figure out where to run it... to see the results of it.

/* My first program in C++ */

#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World ";
cout << "I'm a new C++ user ";
return 0;
}

That's what I have, probably a little messy I know ^_^.

Anyways I will appreciate any comments! Thanks for your time!

I now get this problem:


"The system cannot find the file specified"
Last edited on
In VC++, there should be some sort of |> (like a play button) up near the top of the screen. You can click that and it will build/run your program for you.

You could also try hitting F5, but I'm not sure if the shortcuts have changed.
Thanks for the reply, I pressed f5 and I got the message:

"Unable to start program 'c:\users\tyler\documents\visual studio2010\Projects\Test\Debug\Test1.dll'.

I can't find a play button, but if the f5 is the build/run option I like that. :D

*Edit*

Found the play button on the top ;) Thanks! Now to figure out why I get this message. lol
Last edited on
Help! lol
What kind of project did you open? What is your code? it seems like you tried making a dynamic library which is different then a console program. More insight is needed to help you.
> Unable to start program 'c:\users\tyler\documents\visual studio2010\Projects\Test\Debug\Test1.dll'.

You need to create a 'Win32 Console Aplication' (not a DLL)
http://www.youtube.com/watch?v=o2nZlBnCzFI



I suggest not even using Visual C++. Everyone has their opinions, and I'll post mine, but I strongly suggest using Code::Blocks if you've never programmed before. There is too many options in VC++ and imho, it can greatly overwhelm a newcomer. I don't want to start an argument as to which IDE is better here either.
I agree with Volatile Pulse, 100%. Even the most standard and user-friendly IDE's for Visual C++ such as Visual Studio can easily force a newbie coder to rely primarily on the convenience and functionality of its GUI (Graphic User Interface). With everything so "visual" within the environment being just a mouse click away, it hardly entices the user to utilize traditional code writing practices.

Just to reiterate, download and install Code::Blocks (if you haven't already), and learn to love console apps.

The crucial thing to remember here is:
Be certain that you're working within the project you wish to run before compiling it, and name the file "main.cpp".

(The most important thing I've learned about C++ so far is: DO NOT OVER-COMPLICATE THINGS!)

Hope this helps.
Personally i love code::blocks, easy, user friendly and a great program. Also, if you're going to be visiting this forum to ask questions(that we would be more than happy to help you with) make sure you become accustomed to the code tags, they can turn messy code like this:
using namespace std;
int main()
{ std::cout << "this looks confusing"
std::cout << "It's also very hard to read"
std::cout << "we can never tell where functions and indented statements are
without searching a great deal" << std::endl;
return 0;
}
into:
1
2
3
4
5
6
7
8
using namespace std;
int main()
{ 
    std::cout << "this does not look confusing"
    std::cout << "it's easy to read"
    std::cout << "finding statements and functions is fast and helps us narrow down the problem faster" << std::endl;
    return 0;
}


You can find these on the right side under "Format: ", they have the symbol '<>'.
Last edited on
download bloodshed Dev C++ instead. Thats what I use its good for beginners.
Dev C++ has not been updated in ages. However, it's all personal preference. I do not want to start a debate on which IDE is the best.
VC++ will do just fine. Get your basic coding experience first, then worry about the environment you're running it in.

Anyway, you've made the wrong type of project. Next time, do:
File->New->Project
<Wizard opens>
Expand Visual C++,
Click "general" in the right list,
Click "empty project" in the left list, and enter a name below.

This will create an entirely empty project. Just add a (new) code file and start typing!
Thanks for all the suggestions and great advice, I'll get on them all later, I just really want to solve this first as I can't walk away from a problem.

Gaminic, I did that, I run the program and I still get the same message and it says:

"The system cannot find the file specified"
Bump
What line does the compiler give you the error on? Does the error start with LNK? What file does it say can't be found? Make sure that you created an empty project on a console application. I hope this may steer you into the right direction.

When in doubt, restart Visual Studio.
Solved, thanks :)
What was your solution?
Topic archived. No new replies allowed.