Click here to Skip to main content
15,886,701 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Combo box - Dropdown height? Pin
Cedric Moonen30-Jan-10 3:49
Cedric Moonen30-Jan-10 3:49 
Question#if defined ONE && TWO how to pass two defines at the same time Pin
Chesnokov Yuriy29-Jan-10 0:30
professionalChesnokov Yuriy29-Jan-10 0:30 
AnswerRe: #if defined ONE && TWO how to pass two defines at the same time Pin
Luc Pattyn29-Jan-10 0:33
sitebuilderLuc Pattyn29-Jan-10 0:33 
GeneralRe: #if defined ONE && TWO how to pass two defines at the same time Pin
Chesnokov Yuriy29-Jan-10 0:48
professionalChesnokov Yuriy29-Jan-10 0:48 
GeneralRe: #if defined ONE && TWO how to pass two defines at the same time Pin
Luc Pattyn29-Jan-10 0:50
sitebuilderLuc Pattyn29-Jan-10 0:50 
QuestionHow to get Time difference Pin
Ash_VCPP28-Jan-10 23:08
Ash_VCPP28-Jan-10 23:08 
AnswerRe: How to get Time difference Pin
CPallini28-Jan-10 23:19
mveCPallini28-Jan-10 23:19 
Questionmultiple definition of..... Pin
krish_kumar28-Jan-10 22:02
krish_kumar28-Jan-10 22:02 
hii
Here I give my header file and .c file


/* main.h*/

#include <stdio.h>
#include <stdlib.h>


struct linked_list{
int data;
struct linked_list *next;
};

typedef struct linked_list node_t;

void display (void);
node_t *root = 0;
----------------------------------------------------------------------
/* display.c */

#include "./../inc/main.h"

extern node_t *root;

void display ( )
{
node_t *temp = root;
while (temp -> next != root)
printf(" %d", temp->data);
}

----------------------------------------------------------------------------
while compiling it gives this error

qs2/src/display.c:8: multiple definition of `root'
obj/create.o:/qs2/src/create.c:6: first defined here
obj/display.o: In function `display':


I think this error reltes to node_t *root = 0; ,extern node_t *root;

but I dont know how to clear it ...???


seeking help ...!!

Thnaking you
AnswerRe: multiple definition of..... Pin
CPallini28-Jan-10 22:10
mveCPallini28-Jan-10 22:10 
AnswerRe: multiple definition of..... Pin
KingsGambit28-Jan-10 22:48
KingsGambit28-Jan-10 22:48 
GeneralRe: multiple definition of..... Pin
CPallini28-Jan-10 23:05
mveCPallini28-Jan-10 23:05 
GeneralRe: multiple definition of..... Pin
KingsGambit28-Jan-10 23:32
KingsGambit28-Jan-10 23:32 
GeneralRe: multiple definition of..... Pin
David Crow30-Jan-10 5:30
David Crow30-Jan-10 5:30 
GeneralRe: multiple definition of..... Pin
KingsGambit31-Jan-10 17:58
KingsGambit31-Jan-10 17:58 
AnswerRe: multiple definition of..... Pin
Avi Berger29-Jan-10 8:07
Avi Berger29-Jan-10 8:07 
Questionmember function confusion Pin
tasumisra28-Jan-10 20:10
tasumisra28-Jan-10 20:10 
AnswerRe: member function confusion Pin
Cedric Moonen28-Jan-10 20:15
Cedric Moonen28-Jan-10 20:15 
AnswerRe: member function confusion Pin
CPallini28-Jan-10 21:05
mveCPallini28-Jan-10 21:05 
AnswerRe: member function confusion Pin
Nelek28-Jan-10 21:59
protectorNelek28-Jan-10 21:59 
QuestionRe: member function confusion Pin
CPallini28-Jan-10 22:05
mveCPallini28-Jan-10 22:05 
JokeRe: member function confusion Pin
Nelek28-Jan-10 22:22
protectorNelek28-Jan-10 22:22 
GeneralRe: member function confusion Pin
CPallini28-Jan-10 22:28
mveCPallini28-Jan-10 22:28 
GeneralRe: member function confusion Pin
Nelek28-Jan-10 23:02
protectorNelek28-Jan-10 23:02 
QuestionMicrosoft Visual C++ Runtime Library! Stuck in the issue! What could b the way around? Pin
bilal haider28-Jan-10 20:02
bilal haider28-Jan-10 20:02 
AnswerRe: Microsoft Visual C++ Runtime Library! Stuck in the issue! What could b the way around? Pin
Cedric Moonen28-Jan-10 20:17
Cedric Moonen28-Jan-10 20:17 

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.