Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: explicit keyword Pin
George_George11-Dec-07 0:14
George_George11-Dec-07 0:14 
GeneralRe: explicit keyword Pin
Nelek11-Dec-07 1:23
protectorNelek11-Dec-07 1:23 
GeneralRe: explicit keyword Pin
George_George11-Dec-07 1:41
George_George11-Dec-07 1:41 
GeneralRe: explicit keyword Pin
Nelek10-Dec-07 23:27
protectorNelek10-Dec-07 23:27 
Questionhow to use MFC data Types in win 32 dll Pin
kmani_soft10-Dec-07 18:57
kmani_soft10-Dec-07 18:57 
AnswerRe: how to use MFC data Types in win 32 dll Pin
CPallini10-Dec-07 22:37
mveCPallini10-Dec-07 22:37 
AnswerRe: how to use MFC data Types in win 32 dll Pin
Mark Salsbery11-Dec-07 6:23
Mark Salsbery11-Dec-07 6:23 
Generalstring array v.s. int array Pin
George_George10-Dec-07 18:51
George_George10-Dec-07 18:51 
Hello everyone,


I find strange result in the following program.

1. For string array, dereferencing it will result in the string itself, but for int array, dereferencing it will result in the address of the array;

2. When dereferencing it twice (operator **), why the result is always the 1st element in both string array sample and int array sample?

int main()

{
	wchar_t me[] = L"Hello World \n";
	wchar_t (*me2_ptr)[14] = &me;
	wcout << *me2_ptr << endl;	// output Hello World
	wcout << **me2_ptr << endl; // output H

	int values[] = { 10, 20, 30, 40, 55, 60, 70, 80, 90, 100 };
	int (*pval)[10] = &values;
	wcout << *pval << endl;  // output 0x0017f6f0
	wcout << **pval << endl; // output 10

	return 0;
}



thanks in advance,
George
GeneralRe: string array v.s. int array Pin
Doc Lobster10-Dec-07 22:10
Doc Lobster10-Dec-07 22:10 
GeneralRe: string array v.s. int array Pin
George_George10-Dec-07 22:33
George_George10-Dec-07 22:33 
GeneralRe: string array v.s. int array Pin
CPallini10-Dec-07 22:21
mveCPallini10-Dec-07 22:21 
GeneralRe: string array v.s. int array Pin
George_George10-Dec-07 22:40
George_George10-Dec-07 22:40 
GeneralRe: string array v.s. int array [modified] Pin
CPallini10-Dec-07 22:51
mveCPallini10-Dec-07 22:51 
GeneralRe: string array v.s. int array Pin
George_George10-Dec-07 23:15
George_George10-Dec-07 23:15 
GeneralRe: string array v.s. int array Pin
CPallini10-Dec-07 23:41
mveCPallini10-Dec-07 23:41 
GeneralRe: string array v.s. int array Pin
George_George11-Dec-07 1:54
George_George11-Dec-07 1:54 
GeneralRe: string array v.s. int array Pin
CPallini11-Dec-07 2:11
mveCPallini11-Dec-07 2:11 
GeneralRe: string array v.s. int array Pin
Iain Clarke, Warrior Programmer11-Dec-07 6:08
Iain Clarke, Warrior Programmer11-Dec-07 6:08 
GeneralRe: string array v.s. int array Pin
George_George11-Dec-07 21:14
George_George11-Dec-07 21:14 
GeneralWM_CTLCOLOR Pin
Tara1410-Dec-07 17:42
Tara1410-Dec-07 17:42 
GeneralRe: WM_CTLCOLOR Pin
Naveen10-Dec-07 18:22
Naveen10-Dec-07 18:22 
GeneralCursor color in resource editor Pin
followait10-Dec-07 16:23
followait10-Dec-07 16:23 
GeneralRe: Cursor color in resource editor Pin
Nelek10-Dec-07 23:23
protectorNelek10-Dec-07 23:23 
GeneralRe: Cursor color in resource editor Pin
followait11-Dec-07 3:47
followait11-Dec-07 3:47 
GeneralRe: Cursor color in resource editor Pin
Nelek11-Dec-07 22:32
protectorNelek11-Dec-07 22:32 

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.