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

ATL / WTL / STL

 
QuestionMessage handling Pin
_tasleem5-Oct-07 11:13
_tasleem5-Oct-07 11:13 
QuestionProblem with DispEventAdvise Pin
sandeepkavade4-Oct-07 18:50
sandeepkavade4-Oct-07 18:50 
AnswerRe: Problem with DispEventAdvise Pin
Stuart Dootson4-Oct-07 21:48
professionalStuart Dootson4-Oct-07 21:48 
QuestionWhich DWebBrowserEvents2 function is called when we Rrefresh a webpage Pin
Dhiraj kumar Saini4-Oct-07 1:56
Dhiraj kumar Saini4-Oct-07 1:56 
QuestionAdding a dialog in resource as child window at runtime? Pin
Gyan Prakash3-Oct-07 21:44
Gyan Prakash3-Oct-07 21:44 
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 
Hi, thanks for your reply, the dynamic memory allocation can not happen in any code I write but it is allowed to happen in legacy or other code (i.e. STL, MFC, etc...). What happens at present is:

1) Start of program allocate enough space to the vector
2) Set the current position variable to 0 (i.e. we actually have no elements)
...

x) read in a record (again this is into an already defined variable)
x1) if not at the end of the vector copy the record into the next free position of the vector and increment the current position
x2) clear the contents of the read in variable (so its empty next time it gets a record)


The more I look at this code/mechanism the more clunky and bad it looks but I haven't got any other ideas how to do this, so if you have any suggestions that would be great.

Regarding using a list what methods would allow me to get the behaviour of moving the first element to the end?

cheers,
Andy
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 
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 

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.