Click here to Skip to main content
15,905,563 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Changing the color of a button Pin
CPallini4-Oct-09 23:03
mveCPallini4-Oct-09 23:03 
GeneralRe: Changing the color of a button Pin
ratprita4-Oct-09 23:44
ratprita4-Oct-09 23:44 
GeneralRe: Changing the color of a button Pin
CPallini5-Oct-09 0:18
mveCPallini5-Oct-09 0:18 
AnswerRe: Changing the color of a button Pin
David Crow5-Oct-09 4:09
David Crow5-Oct-09 4:09 
QuestionEnigma with ShellExecute ? [modified] Pin
Souldrift4-Oct-09 22:33
Souldrift4-Oct-09 22:33 
AnswerRe: Enigma with ShellExecute ? Pin
CPallini4-Oct-09 22:58
mveCPallini4-Oct-09 22:58 
GeneralRe: Enigma with ShellExecute ? [modified] Pin
Souldrift4-Oct-09 23:10
Souldrift4-Oct-09 23:10 
GeneralRe: Enigma with ShellExecute ? Pin
CPallini4-Oct-09 23:37
mveCPallini4-Oct-09 23:37 
GeneralRe: Enigma with ShellExecute ? Pin
Souldrift4-Oct-09 23:42
Souldrift4-Oct-09 23:42 
GeneralRe: Enigma with ShellExecute ? Pin
Souldrift5-Oct-09 1:24
Souldrift5-Oct-09 1:24 
QuestionCan i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 21:11
Le@rner4-Oct-09 21:11 
AnswerRe: Can i change window title of SHBrowseForFolder Function. Pin
DeepakMega4-Oct-09 21:34
DeepakMega4-Oct-09 21:34 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 21:39
Le@rner4-Oct-09 21:39 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 21:42
Le@rner4-Oct-09 21:42 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
CPallini4-Oct-09 22:05
mveCPallini4-Oct-09 22:05 
AnswerRe: Can i change window title of SHBrowseForFolder Function. Pin
Iain Clarke, Warrior Programmer4-Oct-09 22:04
Iain Clarke, Warrior Programmer4-Oct-09 22:04 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 22:15
Le@rner4-Oct-09 22:15 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 22:21
Le@rner4-Oct-09 22:21 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Stuart Dootson5-Oct-09 0:11
professionalStuart Dootson5-Oct-09 0:11 
QuestionWrong Output, Cant catch the mistake (DFS) Pin
zeego4-Oct-09 20:51
zeego4-Oct-09 20:51 
Hi I made the following program for depth first search but I am having wrong path. Can anyone catch or tell me what I am doing wrong here. I dont know much how to use the debugger in turbo c professional.

Thanks and regards, Mike.

#include <stdio.h>
#include <conio.h>
#define MAX 6 // Node/Vertex count
int adj[MAX][MAX]={ // Adjacency Matrix 2x2
{0,1,1,1,0,0},
{1,0,0,0,1,1},
{1,0,0,0,0,0},
{1,0,0,0,0,0},
{0,1,0,0,0,0},
{0,1,1,0,0,0}
};

int visited[MAX]; // Visited array

void bfs(int goal); // bfs function

int main ()
{
int g=5; //set Goal node
clrscr();
printf("The nodes order is ");
bfs(g);
return 0;


}

void bfs(int goal)
{

int queue[MAX];
int i,front,rear,root;
front=rear=0;

for (i=1;i<=MAX;i++)
visited[i]=0;

visited[goal]=1;
queue[rear++]=goal;

while(front!=rear)
{
root=queue[front];
for(i=1;i<=MAX;i++)
{
if (adj[root][i] && !visited[i])
{
visited[i]=1;
queue[rear++]=i;
printf("%d",i);
}
front++;
}
}


}
AnswerRe: Wrong Output, Cant catch the mistake (DFS) Pin
DeepakMega4-Oct-09 21:26
DeepakMega4-Oct-09 21:26 
GeneralRe: Wrong Output, Cant catch the mistake (DFS) Pin
zeego4-Oct-09 22:30
zeego4-Oct-09 22:30 
AnswerRe: Wrong Output, Cant catch the mistake (DFS) Pin
Saurabh.Garg4-Oct-09 22:53
Saurabh.Garg4-Oct-09 22:53 
GeneralRe: Wrong Output, Cant catch the mistake (DFS) Pin
zeego4-Oct-09 23:07
zeego4-Oct-09 23:07 
AnswerRe: Wrong Output, Cant catch the mistake (DFS) Pin
DeepakMega4-Oct-09 23:32
DeepakMega4-Oct-09 23:32 

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.