Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDatatype parser for C++ [modified] Pin
Nishad S11-Dec-08 22:25
Nishad S11-Dec-08 22:25 
AnswerRe: Datatype parser for C++ Pin
Garth J Lancaster11-Dec-08 23:30
professionalGarth J Lancaster11-Dec-08 23:30 
GeneralRe: Datatype parser for C++ Pin
Nishad S11-Dec-08 23:54
Nishad S11-Dec-08 23:54 
Questionextern char *toAscii Pin
Manish K. Agarwal11-Dec-08 22:16
Manish K. Agarwal11-Dec-08 22:16 
AnswerRe: extern char *toAscii Pin
Naveen11-Dec-08 23:34
Naveen11-Dec-08 23:34 
GeneralRe: extern char *toAscii Pin
Manish K. Agarwal12-Dec-08 0:36
Manish K. Agarwal12-Dec-08 0:36 
GeneralRe: extern char *toAscii Pin
Naveen12-Dec-08 0:57
Naveen12-Dec-08 0:57 
GeneralRe: extern char *toAscii Pin
Luc Pattyn12-Dec-08 1:33
sitebuilderLuc Pattyn12-Dec-08 1:33 
Hi,

IIRC the correct way to handle this is:
- have a single .c file (say file1.c) that declares the variable (either char toAscii[256] or char* toAscii)
- have all other interested .c files refer to it using extern char* toAscii
the best way to do that is to include it in a .h file
- best is to have file1.c also include that header, so the compiler checks both are compatible.

Doing it that way the variable gets allocated only once, and the declarations are correct and available everywhere.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Fixturized forever. Confused | :confused:


QuestionHow to write the program to solve the formula 2n*(2n-1)............1 in c++ urgently Pin
Neha V11-Dec-08 22:11
Neha V11-Dec-08 22:11 
AnswerRe: How to write the program to solve the formula 2n*(2n-1)............1 in c++ urgently Pin
CPallini11-Dec-08 22:22
mveCPallini11-Dec-08 22:22 
AnswerRe: How to write the program to solve the formula 2n*(2n-1)............1 in c++ urgently Pin
Manish K. Agarwal11-Dec-08 22:25
Manish K. Agarwal11-Dec-08 22:25 
GeneralRe: How to write the program to solve the formula 2n*(2n-1)............1 in c++ urgently Pin
Rick York11-Dec-08 22:42
mveRick York11-Dec-08 22:42 
QuestionEnumerating COM port Pin
bhanu_850911-Dec-08 22:04
bhanu_850911-Dec-08 22:04 
QuestionProblem with retrieveing number of characters in a multiline edit control Pin
gabbana11-Dec-08 22:00
gabbana11-Dec-08 22:00 
AnswerRe: Problem with retrieveing number of characters in a multiline edit control Pin
gabbana11-Dec-08 22:11
gabbana11-Dec-08 22:11 
AnswerRe: Problem with retrieveing number of characters in a multiline edit control Pin
CPallini11-Dec-08 22:19
mveCPallini11-Dec-08 22:19 
QuestionShort cut help Pin
Davitor11-Dec-08 21:18
Davitor11-Dec-08 21:18 
AnswerRe: Short cut help Pin
Jijo.Raj11-Dec-08 21:26
Jijo.Raj11-Dec-08 21:26 
QuestionSplit Form view Pin
kiranin11-Dec-08 20:37
kiranin11-Dec-08 20:37 
AnswerRe: Split Form view Pin
Nishad S11-Dec-08 23:03
Nishad S11-Dec-08 23:03 
QuestionCompare input date with current date! Pin
krajah1011-Dec-08 20:06
krajah1011-Dec-08 20:06 
AnswerRe: Compare input date with current date! Pin
Nishad S11-Dec-08 21:03
Nishad S11-Dec-08 21:03 
GeneralRe: Compare input date with current date! Pin
krajah1011-Dec-08 21:31
krajah1011-Dec-08 21:31 
GeneralRe: Compare input date with current date! Pin
Nishad S11-Dec-08 21:49
Nishad S11-Dec-08 21:49 
AnswerRe: Compare input date with current date! Pin
Jijo.Raj11-Dec-08 21:19
Jijo.Raj11-Dec-08 21:19 

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.