Click here to Skip to main content
15,887,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Deadlock occurs in Function Scoped Static variables (Thread Unsafe in VC++) Pin
Avi Berger26-Feb-10 5:20
Avi Berger26-Feb-10 5:20 
GeneralRe: Deadlock occurs in Function Scoped Static variables (Thread Unsafe in VC++) Pin
Mohammed_Irfan28-Feb-10 22:06
Mohammed_Irfan28-Feb-10 22:06 
QuestionKilling a process by name Pin
transoft26-Feb-10 2:21
transoft26-Feb-10 2:21 
AnswerRe: Killing a process by name Pin
Eugen Podsypalnikov26-Feb-10 2:35
Eugen Podsypalnikov26-Feb-10 2:35 
AnswerRe: Killing a process by name Pin
Maximilien26-Feb-10 2:40
Maximilien26-Feb-10 2:40 
AnswerRe: Killing a process by name Pin
wangningyu26-Feb-10 20:22
wangningyu26-Feb-10 20:22 
AnswerRe: Killing a process by name Pin
Bram van Kampen26-Feb-10 21:41
Bram van Kampen26-Feb-10 21:41 
QuestionBUG IN C (LINKED LIST CODE).......please Help me Pin
sarojbobby26-Feb-10 1:59
sarojbobby26-Feb-10 1:59 
#include<stdio.h>
#include<stdlib.h>


struct sorty{
int xv;
int yv;
int dir;
struct sorty * next;
}*sy=NULL;



void sort(struct sorty *curr , int x , int y , int d)
{


struct sorty * temp1 , * temp2;

temp1 = sy;

printf("asdf\n");

if(sy == NULL){

curr->xv = x;
curr->yv = y;
curr->dir = d;
curr->next = NULL;
sy = curr;

}
else{

if (sy->yv >= y){
printf("a\n");
curr->xv = x;
curr->yv = y;
curr->dir = d;
curr->next = sy;
sy = curr;

}
else{

while( temp1->yv < y ){

temp2 = temp1;
if(temp1->next != NULL){
break;
}
temp1 = temp1->next ;

}
if(temp1->next == NULL && y > temp1->yv){

curr->xv = x;
curr->yv = y;
curr->dir = d;
curr->next = NULL;

temp1->next = curr;
} else{
// printf(" %u %u ",temp1,temp2);
curr->xv = x;
curr->yv = y;
curr->dir = d;
curr->next = temp1;
// temp2->next = curr;
}

}

}
}



void main(){

int i ,j ;
struct sorty * curr1 ;
int a[10] = {1,2,3,4,6,5,7,8,9,10};

for( i = 0 ,j =9; i < 10 ; i++,j--){

// scanf("%d",&j);
curr1 = ( struct sorty *) malloc(sizeof(struct sorty));
sort( curr1 ,i,a[j],i);
// printf("asdf\n");
}

curr1 = sy;

while( curr1 != NULL){
printf(" -- %d %d %d \n",curr1->xv,curr1->yv,curr1->dir);
curr1 = curr1->next;

}


curr1 = sy;

while(curr1 != NULL){

curr1 = curr1->next;
free(sy);
sy = curr1;

}
}
AnswerRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Cedric Moonen26-Feb-10 2:05
Cedric Moonen26-Feb-10 2:05 
JokeRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Nelek26-Feb-10 3:03
protectorNelek26-Feb-10 3:03 
JokeRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Cedric Moonen26-Feb-10 3:13
Cedric Moonen26-Feb-10 3:13 
JokeRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Nelek26-Feb-10 3:20
protectorNelek26-Feb-10 3:20 
GeneralRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Cedric Moonen26-Feb-10 3:46
Cedric Moonen26-Feb-10 3:46 
JokeRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Nelek26-Feb-10 3:56
protectorNelek26-Feb-10 3:56 
GeneralRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
CPallini26-Feb-10 6:02
mveCPallini26-Feb-10 6:02 
AnswerRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
CPallini26-Feb-10 2:08
mveCPallini26-Feb-10 2:08 
AnswerRe: BUG IN C (LINKED LIST CODE).......please Help me Pin
Avi Berger26-Feb-10 7:02
Avi Berger26-Feb-10 7:02 
QuestionDrag Drop from .net application to outside it Pin
Aseem Sharma26-Feb-10 1:56
Aseem Sharma26-Feb-10 1:56 
QuestionAvoiding "auto-select" in editable combobox Pin
Code-o-mat25-Feb-10 23:46
Code-o-mat25-Feb-10 23:46 
AnswerRe: Avoiding "auto-select" in editable combobox Pin
Eugen Podsypalnikov25-Feb-10 23:57
Eugen Podsypalnikov25-Feb-10 23:57 
GeneralRe: Avoiding "auto-select" in editable combobox Pin
Code-o-mat26-Feb-10 0:34
Code-o-mat26-Feb-10 0:34 
GeneralRe: Avoiding "auto-select" in editable combobox Pin
Eugen Podsypalnikov26-Feb-10 1:32
Eugen Podsypalnikov26-Feb-10 1:32 
AnswerRe: Avoiding "auto-select" in editable combobox Pin
Eugen Podsypalnikov26-Feb-10 1:51
Eugen Podsypalnikov26-Feb-10 1:51 
AnswerRe: Avoiding "auto-select" in editable combobox Pin
SandipG 26-Feb-10 1:59
SandipG 26-Feb-10 1:59 
GeneralRe: Avoiding "auto-select" in editable combobox Pin
Code-o-mat26-Feb-10 2:21
Code-o-mat26-Feb-10 2:21 

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.