Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,806 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,287 people online right now. Registration is fast and FREE... Join Now!




Command prompt codes, etc..

 
Reply to this topicStart new topic

Command prompt codes, etc..

Nluk27
3 Oct, 2008 - 01:14 PM
Post #1

New D.I.C Head
*

Joined: 3 Oct, 2008
Posts: 1

I want to learn codes, whether for command prompts, or whatever.. I'd just like to learn some cool codes.
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Command Prompt Codes, Etc..
3 Oct, 2008 - 01:18 PM
Post #2

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,478



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
For C++?

I'm not sure what you are asking, exactly. Can you provide an example?
User is online!Profile CardPM
+Quote Post

UG Cyber
RE: Command Prompt Codes, Etc..
3 Oct, 2008 - 01:25 PM
Post #3

D.I.C Head
**

Joined: 24 Jul, 2008
Posts: 185



Thanked: 3 times
My Contributions
QUOTE(Nluk27 @ 3 Oct, 2008 - 02:14 PM) *

I want to learn codes, whether for command prompts, or whatever.. I'd just like to learn some cool codes.


well, you could make some cool batch scripts. Its easy to learn and read. Basicly its just a text file that a command interpiter executes as if you were typing it in your self. This code is to show you how easy it is compared to C++ or other languages
CODE

@echo off
echo Hello world
pause
exit


@echo off simply turns of the current path text (e.g C:\Windows\System32);
echo Hello World displayes "Hello world" (Without quotes)
pause makes the cmd wait till a button is pressed from the keyboard
exit is self explanitory.

To try it out your self, copy and paste it onto note pad and save it as "Test.bat"

in C++ it would be
cpp

#include <iostream> //Basic input output commands
using namespace std; //type of namespace
int main(void) //C++ always begins in this function
{
cout << "Hello world!" << endl; //Displayes "Hello World" Without quotes
system("pause"); //Waits for a key to be pressed
return 0; //Your return value
}


for batch your dictionary is in your computer. just go into cmd and type help to get a basic list. and for help with a command just type your command with a ? behind it

Hope this helped
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/3/08 02:25PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month