News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

First program.

Started by ikkesomye, January 11, 2011, 12:47:14 AM

Previous topic - Next topic

ikkesomye

I am completely new to any programming language.  I am just sort of following this youtube video making your first C++ program and even though I have followed it step by step when I build and run nothing happens.

I'm sure you have all heard this question before I am just really lost.

This was the youtube video
http://www.youtube.com/watch?v=qkilWa5sX9Y

The website I am learning from
http://www.cprogramming.com/tutorial/lesson1.html

thanks to those willing to help me out.

ikkesomye

#include <iostream>

using namespace std;

int main()
{
  cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
  cin.get();

  return 0;
}


ollydbg

Welcome!!!
QuoteI'm sure you have all heard this question before I am just really lost.
what is your question?? Did you search the forum firstly??
we discuss only Code::blocks related question here, if you would like to discuss some programming question, I suggest you can go to some forum dedicate to that issue.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ikkesomye

my bad sorry.  Basically I am running and building the program and nothing is happening.  I am not getting the same command prompt hellow world! message the user in the video is getting.

ollydbg

en, what the exact steps did you do? also please describe your OS? C::B version? compiler version......

QuoteBasically I am running and building the program and nothing is happening.
this statement has no sense. (you just say: I have a problem which we all know)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ikkesomye

windows 7
codeblocks 10.05

#include <iostream>

using namespace std;

int main()
{
    cout <<"hello world";
    cin get();
    return 0;
}

clicking the button to build and run like said in video.

Nothing happens.

ikkesomye


ollydbg

Quote from: ikkesomye on January 11, 2011, 03:10:18 AM
clicking the button to build and run like said in video.
Nothing happens.
what have you done before you click the button??
...
I don't want to see a whole tutorial to see what the step you take. ( the video takes 10 min)
I suggest you can just use the project wizard to create a simple console program, then test again.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ikkesomye