0

Greetings
I've been faced with this problem may be you could help?

[B]class[/B] CalculatorObject : [B]public[/B] TDialog 
{
	[B]public:[/B]
		StateType CurrentMode;	
		[B]char[/B] Operator;							

		[B]char[/B] DisplayBuffer[DisplayPlusSign];   
		
		[B]BOOL[/B] Negative;							
		[B]BOOL[/B] InputIsADigit([B]char[/B]* input);       
		[B]double[/B] Operand;							
		TBrush CalcBackground;	.....

I need to change char DisplayBuffer into a character pointer instead of a character array.

Many Thanx

2
Contributors
3
Replies
4
Views
11 Years
Discussion Span
Last Post by Ancient Dragon
0

have you tried this? I guess you already know that you will have to allocate memory for that buffer before using it -- yes??

char*  DisplayBuffer;
0

Yeh! thanx. I need to change the definition of DisplayBuffer to allow values to be assigned to it.

0

>>I need to change the definition of DisplayBuffer to allow values to be assigned to it.

you don't have to make it a pointer as I posted, just copy whatever string you want into it.

char DisplayBuffer[255];

strcpy(DisplayBuffer,"Hello World");
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.