1.

Solve : Help Please (not recognized internal...)?

Answer»

Hey, i need some help.

Well i just started "programmming" and ive downloaded c++ VISUAL express edition, and i found this problam, what was happen was that i could never debug/run the code.. which is how i stubbed APON this, i think the cmd isnt working right.. so i went into cmd.exe and tryed a simple ping. and i get this error. "ping" is not recognized as an internal or external command, operable program or batch file.

i'm useing windows XP

keep in MIND that i very new to cmd but is there any way to fix this.. any help would be great.

-Adamstart a command window, at the prompt type

echo %path%

and copy and paste the results into your next post.

Quote from: Dias de VERANO on January 28, 2009, 12:34:52 PM

start a command window, at the prompt type

echo %path%

and copy and paste the results into your next post.




c:\WINDOWS\system32ok i figured out what the problem was.. the default "path" isnt in the system32, how can i set the path internally? so i dont have to set it each time i open cmd.1 Right click My Computer and click properties.

2 In the System Properties window, click on the Advanced tab.

3 In the Advanced section, click the Environment Variables button.

4 In the Environment Variables window, highlight the path variable in the Systems Variable section and click edit.

This is the default Windows XP path variable:

C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem

If you need to add any more folders, they can be added, SEPARATED by semicolons as above.

5 Click OK twice.

6 Reboot
Question I have is what does PING have to do with C++?

Are you trying to perform a system(" "); call in C++ that PINGs?

Hoping this is a friendly console app you are attempting to create and not malicious!

Quote from: DaveLembke on January 28, 2009, 01:13:22 PM
Question I have is what does PING have to do with C++?

Are you trying to perform a system(" "); call in C++ that PINGs?



Nope i was playing around with C ++ and thats how i figured out something was wrong with my cmd.. so i tryed a simple PING to see if i was right...

Everythings working now tho, thanks for the help Ok then... btw you can use SYSTEM(" "); to execute other executables and dos commands from within your C++ program by placing a path to the executable or dos command in between the " " .... the C++ Express should have the .h handlers automatic, older VC++ 6 etc you had to manually #include the handler at the top of the program.

Just in case you wanted to know that ... or the more versatile WinExec or ShellExecute, ShellExecuteEx, or CreateProcess routines that can be imported via the windows headers.



Discussion

No Comment Found