You really should get a book.
You really should get a book.
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
ok i came to the conclusion for now this project is officially being scraped, i am running into thousands of problems....especially once i start trying to make a function to turn the cube...I will need to look for something a bit simpler perhaps.
Take a look at our book recommendation thread. For novices I would point out Accelerated C++ - check if it is hiding among the many PHP books in your local library.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
They are completely different languages. There are things that can be done in one and not in the other, or at least as easily.other languages like php are able to return arrays and it is written in c++ i just figured it would be possible...
In this particular case, though, it is possible. A PHP array is more like a std::vector in C++. A C++ array is a lot more primitive. It is essentially just a continuous block in memory, and doesn't know about it's own length and such.
I know I will be disagreeing with many people here by saying this, but I find the internet just as helpful as books given you find the right tutorials written by people who know what they are doing. I have never read a book on C++. Not saying I know much about C++, I don't. But I think I do know enough to know how to Google for specific topics that I need. For instance, I was doing SDL a while ago, and had done a few simple games. I am currently learning Qt, and can follow through the tutorials quite comfortably, knowing what I am doing at each stage. I do have a (what I think is) weird way of following through tutorials, though - I read through the section once, see the end result, and close everything except my editor and a command prompt for compilation, and try to reimplement what I just saw, myself, from scratch. And then I would compare my code to the tutorial code, and ponder on the differences. I think it's quite effective.
That said, I seem to have an endless supply of passion for programming, so I can and do spend A LOT of time on it, mostly on Google.
well, once again thanks for the input, I will be keeping my eyes out for the books...i may grab a e book of c++ to read....*pops google up*
Also, most libraries allow cross-lending from one library to another, so if you ASK the staff nicely to look up this book:
If they can't locate it, perhaps you can find a university library or some such that can lend it to you?Accelerated C++: Practical Programming by Example
by Andrew Koenig (Author), Barbara E. Moo (Author)
ISBN: 020170353X
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
>> I will need to look for something a bit simpler perhaps.
void start_rubik( char cube[6][3][3] )
That solution is simple and is probably the best one for this problem anyway. Hopefully you will learn about dynamic memory later in your C++ studies, but I don't think there's any reason to use new/delete here.