Click here to Skip to main content
15,916,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Failure to remove folders after using CFileDialog DoModal Pin
Still learning how to code16-Jun-15 2:12
Still learning how to code16-Jun-15 2:12 
GeneralRe: Failure to remove folders after using CFileDialog DoModal Pin
Jochen Arndt16-Jun-15 2:24
professionalJochen Arndt16-Jun-15 2:24 
GeneralRe: Failure to remove folders after using CFileDialog DoModal - **** FIXED (I think !) **** Pin
Still learning how to code16-Jun-15 2:54
Still learning how to code16-Jun-15 2:54 
GeneralRe: Failure to remove folders after using CFileDialog DoModal - **** FIXED (I think !) **** Pin
Jochen Arndt16-Jun-15 3:19
professionalJochen Arndt16-Jun-15 3:19 
QuestionRe: Failure to remove folders after using CFileDialog DoModal Pin
David Crow16-Jun-15 4:21
David Crow16-Jun-15 4:21 
QuestionExisting VR Frame Renderers Pin
Trevor Johansen15-Jun-15 15:25
Trevor Johansen15-Jun-15 15:25 
QuestionLoad CSV file to a database in Windows 64bit Pin
aks.14-Jun-15 22:36
aks.14-Jun-15 22:36 
AnswerRe: Load CSV file to a database in Windows 64bit Pin
Jochen Arndt14-Jun-15 23:45
professionalJochen Arndt14-Jun-15 23:45 
QuestionNew to C++ and Programming, Absolutely new Pin
Member 1176562614-Jun-15 18:36
Member 1176562614-Jun-15 18:36 
AnswerRe: New to C++ and Programming, Absolutely new Pin
Amarnath S14-Jun-15 19:00
professionalAmarnath S14-Jun-15 19:00 
GeneralRe: New to C++ and Programming, Absolutely new Pin
Member 1176562614-Jun-15 19:26
Member 1176562614-Jun-15 19:26 
GeneralRe: New to C++ and Programming, Absolutely new Pin
Richard MacCutchan14-Jun-15 21:42
mveRichard MacCutchan14-Jun-15 21:42 
QuestionAfxGetApp anomaly Pin
ForNow10-Jun-15 9:18
ForNow10-Jun-15 9:18 
QuestionOdd property sheet behavior Pin
David Crow10-Jun-15 4:41
David Crow10-Jun-15 4:41 
AnswerRe: Odd property sheet behavior Pin
Chris Losinger10-Jun-15 5:26
professionalChris Losinger10-Jun-15 5:26 
QuestionAdd lib by pragma Pin
_Flaviu10-Jun-15 0:32
_Flaviu10-Jun-15 0:32 
AnswerRe: Add lib by pragma Pin
David Crow10-Jun-15 2:46
David Crow10-Jun-15 2:46 
GeneralRe: Add lib by pragma Pin
_Flaviu10-Jun-15 23:25
_Flaviu10-Jun-15 23:25 
Questionbad pointer error when I read a class object with CString member Pin
manoharbalu8-Jun-15 20:13
manoharbalu8-Jun-15 20:13 
Answer[Repost] Pin
Sascha Lefèvre8-Jun-15 20:36
professionalSascha Lefèvre8-Jun-15 20:36 
SuggestionRe: bad pointer error when I read a class object with CString member Pin
David Crow9-Jun-15 5:37
David Crow9-Jun-15 5:37 
AnswerRe: bad pointer error when I read a class object with CString member Pin
Stefan_Lang12-Jun-15 0:13
Stefan_Lang12-Jun-15 0:13 
QuestionWindows 8.1 TouchScreen panning does not scroll window for MFC Scrollview or Win32 apps Pin
bob169727-Jun-15 7:10
bob169727-Jun-15 7:10 
AnswerRe: Windows 8.1 TouchScreen panning does not scroll window for MFC Scrollview or Win32 apps Pin
bob1697220-Jun-15 3:31
bob1697220-Jun-15 3:31 
Questionlinked list in C Pin
a random user7-Jun-15 4:28
a random user7-Jun-15 4:28 
well im trying to delete some nodes from my list and search for them using 2 different functions

problem is that deleteNode it just doesnt work (not even an error msgs)
when i activate the print list function it stays the same

could someoen help me with this?

deletes the node:
numStruct* deleteNode(numStruct** firstNode, numStruct* nodeToDelete)
{
numStruct* currNode = *firstNode;
numStruct* temp;

// if the list is not empty
if (*firstNode)
{
// the first node should be deleted
if (currNode == nodeToDelete)
{
*firstNode = (*firstNode)->Next;
free(currNode);
}
else
{
while (nodeToDelete != currNode->Next && currNode->Next)
{
currNode = currNode->Next;
}

if (nodeToDelete == currNode->Next && nodeToDelete)
{
temp = currNode->Next;
currNode->Next = temp->Next;
free(temp);
}
}
}

printf("\n\n");
}


this is my main:


case 2:
{
numStruct* t = anchorNode;
int arr[50] = { 261363 }, spot = 0;


printf("Please enter all the numbers you want to delete and end it with - 999 \n");

while ((arr[spot] != -999) && (spot != 50))
{
scanf("%d", &arr[spot]);

if (arr[spot] != -999)
{
spot++;
}
}

if (arr[spot] == -999)
{
arr[spot] = 261363;
spot--;
}



for (int i = 0; i < spot; i++)
{
int flag = 0;
while ((t->number != arr[i]) && (t->number != NULL))
{

t = t->Next;
if (t->number == arr[i])
{
flag = 1;
}
}

if (flag == 1)
{
deleteNode(anchorNode, t);
t = anchorNode;
}

}


break;
}

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.