Click here to Skip to main content
15,909,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSearching a custom Database Pin
jerry0davis22-Feb-01 5:48
jerry0davis22-Feb-01 5:48 
GeneralRe: Searching a custom Database Pin
l a u r e n22-Feb-01 5:57
l a u r e n22-Feb-01 5:57 
Generaldelete and delete [] what is the difference Pin
22-Feb-01 5:35
suss22-Feb-01 5:35 
GeneralRe: delete and delete [] what is the difference Pin
Michael Dunn22-Feb-01 6:39
sitebuilderMichael Dunn22-Feb-01 6:39 
GeneralRe: delete and delete [] what is the difference Pin
Etienne Danvoye22-Feb-01 7:19
Etienne Danvoye22-Feb-01 7:19 
GeneralRe: delete and delete [] what is the difference Pin
Erik Funkenbusch22-Feb-01 12:47
Erik Funkenbusch22-Feb-01 12:47 
GeneralRe: delete and delete [] what is the difference Pin
Ryan Park23-Feb-01 14:56
Ryan Park23-Feb-01 14:56 
Generalbad arrays .. Pin
Travis D. Mathison22-Feb-01 4:06
Travis D. Mathison22-Feb-01 4:06 
Okay, this is kinda weird ...

I'm going to simplify it (but still show problem)
=================================================
char *ModuleList[10];
char *strInput;
char buffer[80] = {80};
bool bDone = false;
int iLoop = 0;

while (!bDone)
{
strInput = _cgets(buffer);
if (strcmp(strInput, "exit") == 0) { bDone = true; }
else
{
ModuleList[iLoop] = strInput;
iLoop++;
}
}

Now yeah iLoop will go higher than 9 that will cause an error .. but the problem is that the ModuleList array does this:

Input: test
ModuleList[0] == test;
ModuleList[1] == "";
..

Input: again
ModuleList[0] == "again";
ModuleList[1] == "again";
ModuleList[2] == ""
..

See what I mean? why does it change the previous values in the array instead of leaving them alone? The array seems to get screwed up when the strInput = _cgets(buffer); line gets called.

Any help here is much appreciated .. probably some stupid mistake, but I'm a little lost here

Thanks, Travis
GeneralRe: bad arrays .. Pin
Chris Losinger22-Feb-01 4:49
professionalChris Losinger22-Feb-01 4:49 
GeneralRe: bad arrays .. Pin
l a u r e n22-Feb-01 6:03
l a u r e n22-Feb-01 6:03 
GeneralRe: bad arrays .. Pin
Julien22-Feb-01 15:24
Julien22-Feb-01 15:24 
GeneralRe: bad arrays .. Pin
Travis D. Mathison22-Feb-01 16:27
Travis D. Mathison22-Feb-01 16:27 
QuestionDatabase programming?? Pin
22-Feb-01 3:37
suss22-Feb-01 3:37 
GeneralListBox problem ... Pin
Hadi Rezaee22-Feb-01 0:56
Hadi Rezaee22-Feb-01 0:56 
GeneralListCtrl Scrolling Pin
banrio21-Feb-01 23:55
banrio21-Feb-01 23:55 
GeneralResource ID for dynamically created component Pin
nicola21-Feb-01 22:42
nicola21-Feb-01 22:42 
GeneralRe: Resource ID for dynamically created component Pin
l a u r e n22-Feb-01 6:09
l a u r e n22-Feb-01 6:09 
GeneralRe: Resource ID for dynamically created component Pin
Erik Funkenbusch22-Feb-01 12:54
Erik Funkenbusch22-Feb-01 12:54 
QuestionHow to get ip and customer id again!!! Pin
21-Feb-01 21:48
suss21-Feb-01 21:48 
AnswerRe: How to get ip and customer id again!!! Pin
Le Ridder Noir21-Feb-01 22:01
Le Ridder Noir21-Feb-01 22:01 
GeneralDataBase and ATL Pin
ov21-Feb-01 21:42
ov21-Feb-01 21:42 
GeneraliJpeg Image Pin
21-Feb-01 21:38
suss21-Feb-01 21:38 
GeneralRe: iJpeg Image Pin
22-Feb-01 1:46
suss22-Feb-01 1:46 
GeneralHELP! User-defined Msg caused illegal operation at run time Pin
21-Feb-01 19:23
suss21-Feb-01 19:23 
GeneralRe: HELP! User-defined Msg caused illegal operation at run time Pin
Tim Deveaux22-Feb-01 3:45
Tim Deveaux22-Feb-01 3:45 

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.