Teaching new programmers to do the little things early is never a bad idea.
there is no reason that a class database should require a reference to an instance of database to execute a query.
if you need to execute a query on an external database, just execute the query off that instance. inside the query implementation it should always refer to this
Last edited by m37h0d; 08-04-2008 at 08:55 AM.
In this context, you are a new C++ programmer, and it still means that understanding when and where to use const reference to avoid copying is a good thing to learn NOW, rather than later.
Note that objects that are less than or equal to twice the size of a pointer should be passed as copies (so no const reference there), as there would be no benefit to pass a pointer (reference) to those objects.
--
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.
Well I'd like to create something that I originally wanted to create first, even if it has a few bugs. It doesn't mean I'm going to release it, just means I want to do what I originally planned to do with the language. xD
I wanteed to create:
a game ( 2d shooter ),
a web browser,
and an os ( far from my league atm )
Well I know the concepts of creating them, and I know some code that will actually make it work, but the problem is, how to assemble it correctly. I just need to feel more comfortable about C/C++ and learn more about it.
By the way, I have a book called absolute C++, will that help me. And one more thing, how long will it take me to fully learn C/C++
This is probably doable.
That's a HUGE task if you want to do all that a normal browser does with JavaScript and other extensions.a web browser,
On some levels this is probably easier than a web-browser, because you need a lot less of your own OS to actually do something useful - but if you are after something that can read disks, talk to the internet and display 3D graphics [using a modern graphics card], you are in for a big task f'sure.and an os ( far from my league atm )
--
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 have worked with the functions ( WINAPI ( MSDN ) ) in DX & Windows, I know how to import textures, and I've made polies on 2d space and such. So..
By the way, I forgot, a database software was one of the things I wanted to create. :P