Jump to content
  • Advertisement
Sign in to follow this  
BattleBuddha

New to programming need some help!

This topic is 3054 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!