Hello!

This is my first post at the forums. And also my first problem with C++. I've programmed in a quite simple programming language called GML, short for GameMakerLanguage. It's a language for a program called GameMaker hence the name GML. (www.gamemaker.nl)

In GM you were able to make scripts and objects. Objects could execute these scripts, you could make your own functions using these scripts. There were events, a draw event used for drawing text and images, create events, mouse click events and many more. At each event, a piece of code or script could be executed.

In the draw event for example, I was able to draw some text using a for loop.

Code:
for(i=0; i < 10; i+=1){
draw_text(0,0 + (i*20), i)
}
The first two arguments were the x, y position on the screen, and the last the text to be drawn at that position. It's really easy.

However, GameMaker's speed is far from that of C++. GM is a tool for beginner game makers, learn a bit about programming and used for easy mainly 2D game developing. I decided it was time to move on to a much more advanced programming language.

So I was reading all of the lessons from 'C++ made easy' and got to the functions part. I figured it'd be a bit similar to GM's scripts loops, variables, conditional statements were all similar to GM. But I'm having problems with C++'s functions.

I learned that a function in C++ execute some code and return a function. Like
Code:
return a * b
But I was hoping to be able to do more. Like using a function to print various text using a loop.

A bit like this:
Code:
for(i=0;i < Times; i++){cout << Number << " Times " << i " = " << i*Number;}
Also, GM had arguments. You could write:
Code:
MultiplyScript(5, 2)
And in the script MultiplyScript:
Code:
return (argument0 * argument1)
And it would return 10.

I hope I'm making sence, not making too many mistakes or breaking any rules. Sorry, I'm really new to C++ and these boards, bear with me!

Thanks in advanced! I'm also looking for somebody who could teach me a few basics, get me started. The tuts are great, but sometimes don't cover every single thing. I'd love to have a buddy on preferably MSN who could help me with some problems.

- Tarik Abbara