Click here to Skip to main content
15,922,584 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionVector Pin
mcsherry3-Oct-07 5:17
mcsherry3-Oct-07 5:17 
AnswerRe: Vector Pin
Chris Losinger3-Oct-07 5:36
professionalChris Losinger3-Oct-07 5:36 
GeneralRe: Vector Pin
mcsherry3-Oct-07 5:47
mcsherry3-Oct-07 5:47 
GeneralRe: Vector Pin
mcsherry3-Oct-07 5:54
mcsherry3-Oct-07 5:54 
GeneralRe: Vector Pin
Chris Losinger3-Oct-07 6:11
professionalChris Losinger3-Oct-07 6:11 
GeneralRe: Vector Pin
Nemanja Trifunovic3-Oct-07 7:47
Nemanja Trifunovic3-Oct-07 7:47 
AnswerRe: Vector Pin
Nathan Holt at EMOM3-Oct-07 11:10
Nathan Holt at EMOM3-Oct-07 11:10 
AnswerRe: Vector Pin
John R. Shaw6-Oct-07 0:55
John R. Shaw6-Oct-07 0:55 
Well first off you are using dynamic memory just by using the ‘vector’ class, or any other STL collection, to store your records. Whether or not is frees the memory used by the first element is another story, it may just move the other elements down by one address, making the previous last element space empty (break out the pencil and paper). If the implementation of the ‘vector’ you are using does that, then you can simply remove the first element and add the new element to the end, and you have met the requirement (no special coding required); provided your class does not allocate memory in its copy constructor.

If you were dealing with a situation where you are supposed to write your own ‘vector’ type class, then I would say that instructor wants you to learn about ‘in place’ construction (look it up) using ‘new”.

Sorry if that did not help, but it is something you need to examine in detail to understand.


INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

QuestionHow to detect page refresh in vc++ Pin
rindam3-Oct-07 3:19
rindam3-Oct-07 3:19 
Questionsending sms through aspx.cs code in c# Pin
sh_india61@yahoo.com3-Oct-07 2:39
sh_india61@yahoo.com3-Oct-07 2:39 
AnswerRe: sending sms through aspx.cs code in c# Pin
vadivelub7-Apr-09 5:07
vadivelub7-Apr-09 5:07 
QuestionString problem Pin
david bagaturia1-Oct-07 22:19
david bagaturia1-Oct-07 22:19 
AnswerRe: String problem Pin
Jonas Larsson2-Oct-07 0:49
Jonas Larsson2-Oct-07 0:49 
GeneralRe: String problem Pin
david bagaturia2-Oct-07 3:38
david bagaturia2-Oct-07 3:38 
GeneralRe: String problem Pin
Stephen Hewitt2-Oct-07 4:43
Stephen Hewitt2-Oct-07 4:43 
GeneralRe: String problem Pin
Jonas Larsson2-Oct-07 21:58
Jonas Larsson2-Oct-07 21:58 
GeneralRe: String problem Pin
david bagaturia3-Oct-07 0:03
david bagaturia3-Oct-07 0:03 
AnswerRe: String problem Pin
John R. Shaw6-Oct-07 1:04
John R. Shaw6-Oct-07 1:04 
Questionwhere is the mistake here? Pin
rindam1-Oct-07 3:02
rindam1-Oct-07 3:02 
AnswerRe: where is the mistake here? Pin
led mike1-Oct-07 4:54
led mike1-Oct-07 4:54 
QuestionHow to print the cookie value Pin
rindam1-Oct-07 0:52
rindam1-Oct-07 0:52 
AnswerRe: reading cookie vakue in vc++ Pin
david bagaturia1-Oct-07 22:36
david bagaturia1-Oct-07 22:36 
QuestionInternetGetCookie returning false always,plz help me to read cookie value from VC++ Pin
rindam30-Sep-07 19:07
rindam30-Sep-07 19:07 
AnswerRe: InternetGetCookie returning false always,plz help me to read cookie value from VC++ Pin
Stuart Dootson30-Sep-07 20:49
professionalStuart Dootson30-Sep-07 20:49 
GeneralRe: InternetGetCookie returning false always,plz help me to read cookie value from VC++ Pin
rindam30-Sep-07 21:26
rindam30-Sep-07 21:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.