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

C / C++ / MFC

 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Eytukan22-Mar-09 5:34
Eytukan22-Mar-09 5:34 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Endomlic22-Mar-09 5:36
Endomlic22-Mar-09 5:36 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Eytukan22-Mar-09 5:38
Eytukan22-Mar-09 5:38 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Endomlic22-Mar-09 5:41
Endomlic22-Mar-09 5:41 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Eytukan22-Mar-09 5:59
Eytukan22-Mar-09 5:59 
JokeRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Rajesh R Subramanian22-Mar-09 5:40
professionalRajesh R Subramanian22-Mar-09 5:40 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Eytukan22-Mar-09 5:46
Eytukan22-Mar-09 5:46 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Endomlic22-Mar-09 5:54
Endomlic22-Mar-09 5:54 
Yay I got it to work!
It was
char* buff;

if statement;

buff = (char*) malloc( sizeof(char) * atoi( argv[1] ) );

Apparently I had to use argv 1 instead of 2.
I guess in gcc argv 0 is the program name.


Thanks to you guys for all the help!!
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Eytukan22-Mar-09 6:02
Eytukan22-Mar-09 6:02 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
CPallini22-Mar-09 7:40
mveCPallini22-Mar-09 7:40 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
Eytukan22-Mar-09 8:27
Eytukan22-Mar-09 8:27 
GeneralRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
CPallini22-Mar-09 6:23
mveCPallini22-Mar-09 6:23 
AnswerRe: An 'If' statement before my char declaration is not allowing my program to compile......why? Pin
ky_rerun22-Mar-09 15:05
ky_rerun22-Mar-09 15:05 
QuestionConverting a lowercase letter to uppercase while keyboard input Pin
pandit8422-Mar-09 3:58
pandit8422-Mar-09 3:58 
AnswerRe: Converting a lowercase letter to uppercase while keyboard input Pin
Yusuf22-Mar-09 4:52
Yusuf22-Mar-09 4:52 
QuestionRe: Converting a lowercase letter to uppercase while keyboard input Pin
David Crow22-Mar-09 16:47
David Crow22-Mar-09 16:47 
QuestionGood ol static member inits Pin
Eytukan21-Mar-09 21:45
Eytukan21-Mar-09 21:45 
AnswerRe: Good ol static member inits Pin
Gary R. Wheeler21-Mar-09 22:26
Gary R. Wheeler21-Mar-09 22:26 
GeneralRe: Good ol static member inits Pin
Eytukan21-Mar-09 22:59
Eytukan21-Mar-09 22:59 
GeneralRe: Good ol static member inits Pin
Gary R. Wheeler21-Mar-09 23:28
Gary R. Wheeler21-Mar-09 23:28 
GeneralRe: Good ol static member inits Pin
Eytukan21-Mar-09 23:44
Eytukan21-Mar-09 23:44 
GeneralRe: Good ol static member inits Pin
Gary R. Wheeler21-Mar-09 23:58
Gary R. Wheeler21-Mar-09 23:58 
GeneralRe: Good ol static member inits Pin
Eytukan22-Mar-09 0:05
Eytukan22-Mar-09 0:05 
GeneralRe: Good ol static member inits Pin
Stuart Dootson23-Mar-09 0:31
professionalStuart Dootson23-Mar-09 0:31 
GeneralRe: Good ol static member inits Pin
Eytukan23-Mar-09 2:23
Eytukan23-Mar-09 2:23 

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.