Sign in to follow this  
barakat

hmmmm ...getting more advanced ...

Recommended Posts

barakat    144
Hi all; i have some questions .... -i finished a c++ course ...i was using dietel How to program as my text book .... i am very interested in more advanced c++ ...i mean i want to get more deeper in OO tech ... polymorphism ... and this advanced stuff .. which i think i really know some good about it ... but cant practise... ( no ideas ).... now i am into a data structure course at my college .. and i want good resources ..for advanced data structures ... like hash tables ...red black trees also i need to read abut effeciency and code optimiztion ( can find some text :( ....) How can i make my classes support STL ?? Do i have to follow some way when writing/reading strings to file ( binary , text) ... if it was a C string or a std::string ? and i have a question realted to data structures ... the list ...there is a linked list and a list implemented on an array ..which is better when ??? sorry English isnot my native language :) thanks in Advance

Share this post


Link to post
Share on other sites
Toolmaker    967
You over use ... quite alot. It makes your post annoying to read.

There are a million articles on C++ out there. Do a google search on C++ Templates to see how to get STL like style.

Toolmaker

Share this post


Link to post
Share on other sites
chollida1    532
List's implemented as an array are faster to access as all their data is sequential and gives teh CPU, or an alert programmer, a chance to prefetch alot of it into the cache. Can be trouble as they grow as they need to reallocate memory. Though someone will point out that you can preallocate memory on most implementations.
Any unused memory is wasted.

Link List's don't have to relallocate memory when they need to grow. but they are slower as each read often requires reading from main memory. No wasted memory from preallocation.


Cheers
Chris

Share this post


Link to post
Share on other sites
iMalc    2466
The best way to learn is by doing. Even if you've read every book cover-to-cover you're not going to get what you can only get from years of practice.
What you need it a fun project.
A ray-tracer is an excellent program to start on. You learn some basic maths and physics and can get a nice end-result very quickly.
Other ideas include a ray-tracer or sokoban clone, or learn bits of your OS'es API such as try and calculate the total number of bytes used for the contents of a folder... There are so many things you could do.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this