Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How TO Create A Menu At The Bottom Pin
jannathali11-May-07 1:56
jannathali11-May-07 1:56 
QuestionMDI problem Pin
Aint10-May-07 20:28
Aint10-May-07 20:28 
AnswerRe: MDI problem Pin
Arman S.10-May-07 20:37
Arman S.10-May-07 20:37 
AnswerRe: MDI problem Pin
bob1697210-May-07 20:40
bob1697210-May-07 20:40 
GeneralRe: MDI problem Pin
Aint10-May-07 20:59
Aint10-May-07 20:59 
GeneralRe: MDI problem Pin
bob1697211-May-07 2:03
bob1697211-May-07 2:03 
Questionemail page creation Pin
santhi_malli10-May-07 19:42
santhi_malli10-May-07 19:42 
QuestionClass and pointer Pin
C_Zealot10-May-07 18:43
C_Zealot10-May-07 18:43 
Hi all:

Ran into a tiny problem here.

I have declared a class as following:

class CStack {<br />
  char* stk[STK_MAX];  // Use an array to store the stacked data<br />
  int stkIndex;      // Index of the first free position in the stack<br />
public:              // Stuff before this is private, after it is public<br />
  void push(int i) { // Method to push i into the stack<br />
    assert(stkIndex < STK_MAX);<br />
    *stk[stkIndex++] = i;<br />
  }    <br />
};


And in 'main' function that follows:

CStack stack;  // This is a stack<br />
  for (int i = 1; i < argc; i++) {<br />
     stack.push(atoi(argv[i]));            //Here is where my codes crashes. argv[i] is just some numbers.<br />
	 assert(stack.count() == i);<br />
  }


Just wondering why?
Thank you
AnswerRe: Class and pointer Pin
bob1697210-May-07 19:18
bob1697210-May-07 19:18 
GeneralRe: Class and pointer Pin
C_Zealot10-May-07 19:35
C_Zealot10-May-07 19:35 
GeneralRe: Class and pointer Pin
bob1697210-May-07 19:53
bob1697210-May-07 19:53 
AnswerRe: Class and pointer Pin
vibindia10-May-07 19:27
vibindia10-May-07 19:27 
GeneralRe: Class and pointer Pin
C_Zealot10-May-07 19:36
C_Zealot10-May-07 19:36 
AnswerRe: Class and pointer Pin
Stephen Hewitt10-May-07 19:36
Stephen Hewitt10-May-07 19:36 
GeneralRe: Class and pointer Pin
C_Zealot10-May-07 19:39
C_Zealot10-May-07 19:39 
GeneralRe: Class and pointer Pin
Stephen Hewitt10-May-07 19:44
Stephen Hewitt10-May-07 19:44 
QuestionHow to get the width & height of MPEG files with DirectX SDK? Pin
raytracingx10-May-07 18:05
raytracingx10-May-07 18:05 
AnswerRe: How to get the width & height of MPEG files with DirectX SDK? Pin
Hamid_RT11-May-07 0:42
Hamid_RT11-May-07 0:42 
GeneralRe: How to get the width & height of MPEG files with DirectX SDK? Pin
raytracingx13-May-07 16:08
raytracingx13-May-07 16:08 
QuestionApplication Data Directories Pin
Richard Andrew x6410-May-07 18:02
professionalRichard Andrew x6410-May-07 18:02 
QuestionThread parameter use same value for all thread ????? Pin
amitmistry_petlad 10-May-07 17:55
amitmistry_petlad 10-May-07 17:55 
AnswerRe: Thread parameter use same value for all thread ????? Pin
Arman S.10-May-07 20:40
Arman S.10-May-07 20:40 
GeneralRe: Thread parameter use same value for all thread ????? Pin
amitmistry_petlad 10-May-07 21:10
amitmistry_petlad 10-May-07 21:10 
GeneralRe: Thread parameter use same value for all thread ????? Pin
Arman S.11-May-07 0:13
Arman S.11-May-07 0:13 
GeneralRe: Thread parameter use same value for all thread ????? Pin
Arman S.11-May-07 1:01
Arman S.11-May-07 1:01 

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.