Click here to Skip to main content
15,912,493 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create CScrollBar into the CEdit Pin
Eugene Pustovoyt23-Apr-02 9:18
Eugene Pustovoyt23-Apr-02 9:18 
GeneralRe: Create CScrollBar into the CEdit Pin
Roger Allen23-Apr-02 21:38
Roger Allen23-Apr-02 21:38 
GeneralRe: Create CScrollBar into the CEdit Pin
Eugene Pustovoyt24-Apr-02 7:58
Eugene Pustovoyt24-Apr-02 7:58 
GeneralRe: Create CScrollBar into the CEdit Pin
Ravi Bhavnani24-Apr-02 8:06
professionalRavi Bhavnani24-Apr-02 8:06 
Questionhoow to owner draw controls? Pin
DiegoValdevino23-Apr-02 5:36
DiegoValdevino23-Apr-02 5:36 
AnswerRe: hoow to owner draw controls? Pin
Mazdak23-Apr-02 5:40
Mazdak23-Apr-02 5:40 
AnswerRe: hoow to owner draw controls? Pin
Thomas Freudenberg23-Apr-02 5:55
Thomas Freudenberg23-Apr-02 5:55 
QuestionIncrement an int value in a char array? Pin
23-Apr-02 5:33
suss23-Apr-02 5:33 
Newbie Question!

I need the integer value in a 'command line char array' to increment with the for loop.

eg
On the first loop the cmdline[]="C:\\myexecutable --getmemory SM 1";
On the second loop the cmdline[]="C:\\myexecutable --getmemory SM 2";
On the third loop the cmdline[]="C:\\myexecutable --getmemory SM 3";
etc, for 10 loops.

I have tried the following

for(int i =1; i<=10; i++)
{
char strInitial[] = "C:\\myexecutable --getmemory SM ";
char cmdline[]=("%s [i]", strInitial);

...//snip
}

But I get the following error:
error C2440: 'initializing' : cannot convert from 'char *' to 'char []'


Or if I remove the ()'s

for(int i =1; i<=10; i++)
{
char strInitial[] = "C:\\myexecutable --getmemory SM ";
char cmdline[]="%s [i]", strInitial;

...//snip
}

Then I get the following error:
error C2040: 'strInitial' : 'char' differs in levels of indirection from 'char [49]'

Please help!
Thanks.
AnswerRe: Increment an int value in a char array? Pin
Tim Smith23-Apr-02 5:55
Tim Smith23-Apr-02 5:55 
GeneralRe: Increment an int value in a char array? Pin
23-Apr-02 7:10
suss23-Apr-02 7:10 
GeneralUser defined Message Pin
act_x23-Apr-02 5:19
act_x23-Apr-02 5:19 
GeneralTransparent windows. Pin
23-Apr-02 5:11
suss23-Apr-02 5:11 
GeneralRe: Transparent windows. Pin
Paul M Watt23-Apr-02 5:20
mentorPaul M Watt23-Apr-02 5:20 
GeneralRe: Transparent windows. Pin
23-Apr-02 5:27
suss23-Apr-02 5:27 
GeneralRe: Transparent windows. Pin
Albert Pascual23-Apr-02 7:43
sitebuilderAlbert Pascual23-Apr-02 7:43 
GeneralODBC - Microsoft SQL server Pin
Wizard_0123-Apr-02 5:10
Wizard_0123-Apr-02 5:10 
GeneralRe: ODBC - Microsoft SQL server Pin
Renjith Ramachandran23-Apr-02 7:31
Renjith Ramachandran23-Apr-02 7:31 
GeneralRe: ODBC - Microsoft SQL server Pin
Wizard_0123-Apr-02 7:54
Wizard_0123-Apr-02 7:54 
GeneralRe: ODBC - Microsoft SQL server Pin
Renjith Ramachandran23-Apr-02 17:45
Renjith Ramachandran23-Apr-02 17:45 
GeneralRe: ODBC - Microsoft SQL server Pin
Carlos Antollini23-Apr-02 8:08
Carlos Antollini23-Apr-02 8:08 
GeneralRe: ODBC - Microsoft SQL server Pin
Wizard_0123-Apr-02 8:10
Wizard_0123-Apr-02 8:10 
GeneralRe: ODBC - Microsoft SQL server Pin
Carlos Antollini23-Apr-02 8:13
Carlos Antollini23-Apr-02 8:13 
GeneralRe: ODBC - Microsoft SQL server Pin
Wizard_0123-Apr-02 8:17
Wizard_0123-Apr-02 8:17 
GeneralRe: ODBC - Microsoft SQL server Pin
Carlos Antollini23-Apr-02 8:28
Carlos Antollini23-Apr-02 8:28 
GeneralClass static variables initalization problem during program run Pin
23-Apr-02 4:57
suss23-Apr-02 4:57 

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.