New to programming need some help!

Recommended Posts

Awhile back I decided to take my hand at programming. So as I am sure quite alot of you have seen this so please bare with me. I got A Beginners Guide to C++. /* This is a simple C++ program. Call this file Sample.cpp. */ #include <iostream> using namespace std; // A C++ program begins at main(). int main() { cout << "C++ is power programming."; return 0; } I followed the code a T, but when I go to compile the the code in Microsoft Visiual Studio 2008 I get this message in Command Prompt.... "... Is not recongnized as an internal or external command, operable program or batch file" What am I doing wrong?

Share on other sites
do you have the full error message?

Share on other sites
C:\Users\Nate\Documents\Visuial Studio 2008\Projects\Sample1.cpp>cl -GX Sample1.cpp

C\Users\Nate\Visiual is not recongnized as an internal or external command, operable program or batch file"

I hope that helps :)

Share on other sites
try it whit "Visual" in stead of "Visuial"

or did you change it your self to this
or is this some curious language version ?

Share on other sites
Oh wow sorry I mistyped. No I spelled it visual when I was entering it into command prompt so it is correct, sorry about that typo.

Share on other sites
Quote:
 C:\Users\Nate\Documents\Visuial Studio 2008\Projects\Sample1.cpp>cl -GX Sample1.cpp

I'm not sure I'm following here. Are you typing the above paragraph into the command window manually? The error message you receive kind of hints towards that anyway. It basically tells you that there is no executable file called "Visuial" located at C:\Users\Nate\Documents\. Which is exactly what you would get if you typed the above paragraph in a "DOS"-window and hit enter, due to the lack of " " around the path which is space-split.

But why you are doing so is beyond me, try hitting F7 in visual studio instead to compile :)

If you are compiling through visual studio by the usual means and still get this error, then I'm afraid your installation of Visual Studio is rather messed up and in desperate need of a reinstall. There is nothing wrong with your code, it's just the compiler that fails to execute.

Share on other sites
Hello,

i am not so sure what you are doing exactly, but if you are typing into cmd.exe try this:

Execute vcvars32.bat in C:\Programme\Microsoft Visual Studio 8\VC\bin
use same cmd window to compile.

if this fails, try looking here.

http://msdn.microsoft.com/en-us/library/ms235639%28VS.80%29.aspx

GWDev

Share on other sites
When you see something in a book like:

C:\Users\Nate\Documents\Visual Studio 2008\Projects\Sample1.cpp>cl -GX Sample1.cpp

The first part up until the '>' is the command prompt. You do not type it as part of your command. Instead, it shows you what directory you should be in, in order to use the command.

It's wrong, anyway, because the file name is not part of the directory path. I assume you have a project named 'Sample1', so that would be part of the directory path.

Here are step-by-step instructions:

1) Open a command window. You should see something like C:\Users\Nate>_, with the underscore blinking.

2) Type cd "Documents\Visual Studio 2008\Projects\Sample1", with the quotes, and hit enter.

3) The next line should now look like C:\Users\Nate\Documents\Visual Studio 2008\Projects\Sample1>_.

4) Type cl -GX Sample1.cpp and hit enter.

Share on other sites
Hey guys thank you I finally got it to work, and panic bud I don't know what I am trying to do. I have been an artist and a modeler for so long I thought I would take my hand at the foundation of game design instead of the artistic side.

Share on other sites
Hey, good for you for jumping into programming like this! i just did a mentoring project with a middle school student last year, so I know how hard it can be to jump into game dev

Share on other sites
Quote:
 Original post by BattleBuddhaI have been an artist and a modeler for so long I thought I would take my hand at the foundation of game design instead of the artistic side.

C++ has little to do with "the foundation of game design", BTW. In most modern games, it's behind the tools that do the heavy lifting, but a lot (in many cases, the vast majority) of the work is at a much higher level, "scripting" the events. Everything is built in layers, and the real experts are the ones with a grasp on the whole process.

It's not really much different from the 3D art world in that respect, where you have concept artists, modellers, texture artists (both creating the textures and UV mapping and unwrapping), riggers and animators - and then also technical artists (the guys who are talking to the programmers to find out what the polygon count targets are and how big the textures should be - and who understand how to run the exporters, and why UV mapping is called UV mapping).

Also, many programmers feel that what they do is just as "artistic", though perhaps in a quite unconventional sense ;)

Share on other sites
to do it the manual way you have to know your evironment Which is windows that sits on top of the old DOS. use dir to see if you are in the right location.
type just cl to see if its in the environment path
if not you need to regester it. See the Documents that comes with visual c++ it has it in more detail.

Create an account

Register a new account

• Forum Statistics

• Total Topics
628379
• Total Posts
2982353

• 10
• 9
• 15
• 24
• 11