Question about streamer
#4

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
(in c++)
You mean C, not C++. If you want to program in C++, put the arrays you know from C aside and begin programming in C++ - using vectors and other containers. (like Balon said).
http://www.parashift.com/c++-faq-lite/containers.html

It returns the error, because you are saving the objects on the stack, which has a limited size.
Begin storing them in the free store, which is only limited by the size of the RAM.
(The vector is saving his objects on the free store. You can also use new and delete - dynamic memory. The containers are using them.)
It is even more simpler if you would take use of the boost library. They have also solutions.

Edit: Examples

Vectors:
http://cplusplus.com/reference/stl/vector/
You add elements with push_back
http://cplusplus.com/reference/stl/vector/push_back/
There are examples

Dynamic Memory:
http://cplusplus.com/doc/tutorial/dynamic/

Boost library containers:
http://www.boost.org/doc/libs/1_43_0...htm#Containers
Reply


Messages In This Thread
Question about streamer - by RyDeR` - 28.07.2010, 16:19
Re: Question about streamer - by Balon - 28.07.2010, 17:06
Re: Question about streamer - by RyDeR` - 28.07.2010, 17:26
Re: Question about streamer - by Remis - 29.07.2010, 12:17
Re: Question about streamer - by RyDeR` - 30.07.2010, 17:25
Re : Question about streamer - by scott1 - 30.07.2010, 19:14
Re: Question about streamer - by Kar - 30.07.2010, 20:15
Re: Question about streamer - by RyDeR` - 30.07.2010, 21:08
Re: Question about streamer - by Remis - 30.07.2010, 21:46
Re: Question about streamer - by kc - 30.07.2010, 22:16
Re: Question about streamer - by Romanius - 31.07.2010, 05:48

Forum Jump:


Users browsing this thread: 2 Guest(s)