![]() |
dynamic array problem
Hey guys!
I'm trying to write a dynamic array. I was thinking of using the std STL library, but then I thought that if I write this then i'll understand better... well, i honestly can't understand why it doesnt work: :
#pragma once:
#include <iostream>it crashes about halfway. the allocation seems very inconsistent :confused: hope you can help me out! many thanks! ;) |
The main problem I picked up at first glance is in your loops of the form;
:
while (*p)There may be other problems as well; I stopped after encountering only one problem. |
ah of course! pretty obvious!
thanks for the pointer Grumpy! i will fix this now - bit busy at work at the moment, but when i get a chance ill fix and get back! :banana: |
Hint: use something like memcpy.
|
hey,
well i finally got a chance to work on this, its all sorted now! wow, such a stupid thing to do! thanks for the help guys! much appreciated! :D |
| All times are GMT -5. The time now is 2:07 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC