A few questions.

I'm jumping from Lua to C++, and in Lua I used tables (arrays) a lot. I was wondering if you could put a array inside of a array in C++?

What can I do if I don't know how many arguments a function takes?

Can someone explain Polymorphism? (or provide a decent tutorial)
I'm jumping from Lua to C++, and in Lua I used tables (arrays) a lot. I was wondering if you could put a array inside of a array in C++?

You can. However, you generally use vectors instead of arrays in C++.

What can I do if I don't know how many arguments a function takes?

Then you look it up. Most IDEs show calltips with the parameters when you type the name of a function.

Can someone explain Polymorphism? (or provide a decent tutorial)

http://mindview.net/Books/TICPP/ThinkingInCPP2e.html
Chapter 1 (Interchangeable objects with polymorphism) and chapter 15.
In C/C++ you can have multi-dimensional arrays, though everyone only goes as far as 2D arrays because the memory usage grows really quickly if you have more.

Can someone explain Polymorphism? (or provide a decent tutorial)


Google is your best friend !! And wiki

There is heaps of stuff in the reference section on this site.

What can I do if I don't know how many arguments a function takes?


I would get the basics sorted out before worrying about that.

It can be done by the use of default arguments, which means that you specify default values for args, so if the function is called without some args, the default values will be used instead.
Awesome thanks guys. Any IDE's you would recommend?
I use KDevelop on linux.

If you have windows lot's of people use Visual Studio, but there are heaps of others.

The good thing about linux, is that it's awesome for computer scientists because it lots of fully featured programming languages and environments, enterprise level software, and thousands of apps, AND IT IS ALL FREE

Linux is also very secure
Topic archived. No new replies allowed.