30 Minutes New :)

Jun 11, 2012 at 3:14am
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 Jun 12, 2012 at 3:17am
Jun 11, 2012 at 3:39am
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.
Jun 11, 2012 at 3:42am
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 Jun 11, 2012 at 3:44am
Jun 11, 2012 at 4:28am
Help! lol
Jun 11, 2012 at 4:57am
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.
Jun 11, 2012 at 4:58am
> 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



Jun 11, 2012 at 5:04am
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.
Jun 11, 2012 at 6:01am
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.
Jun 11, 2012 at 7:37am
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 Jun 11, 2012 at 7:38am
Jun 11, 2012 at 7:50am
download bloodshed Dev C++ instead. Thats what I use its good for beginners.
Jun 11, 2012 at 8:11am
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.
Jun 11, 2012 at 8:33am
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!
Jun 12, 2012 at 2:56am
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"
Jun 12, 2012 at 3:31am
Bump
Jun 12, 2012 at 4:56am
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.
Jun 12, 2012 at 5:09am
Solved, thanks :)
Jun 12, 2012 at 5:21am
What was your solution?
Topic archived. No new replies allowed.