Click here to Skip to main content
15,898,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Get the machine name of the mapped drive C++ Pin
David Crow12-Jan-09 4:25
David Crow12-Jan-09 4:25 
GeneralRe: Get the machine name of the mapped drive C++ Pin
Hamid_RT12-Jan-09 5:12
Hamid_RT12-Jan-09 5:12 
JokeRe: Get the machine name of the mapped drive C++ Pin
Iain Clarke, Warrior Programmer12-Jan-09 5:23
Iain Clarke, Warrior Programmer12-Jan-09 5:23 
JokeRe: Get the machine name of the mapped drive C++ Pin
Rajesh R Subramanian12-Jan-09 5:31
professionalRajesh R Subramanian12-Jan-09 5:31 
GeneralRe: Get the machine name of the mapped drive C++ Pin
Iain Clarke, Warrior Programmer12-Jan-09 5:42
Iain Clarke, Warrior Programmer12-Jan-09 5:42 
QuestionFunction not getting overloaded... Pin
vikram.vit12-Jan-09 2:07
vikram.vit12-Jan-09 2:07 
AnswerRe: Function not getting overloaded... Pin
Stuart Dootson12-Jan-09 4:12
professionalStuart Dootson12-Jan-09 4:12 
AnswerRe: Function not getting overloaded... Pin
Rajasekharan Vengalil12-Jan-09 5:14
Rajasekharan Vengalil12-Jan-09 5:14 
That's an interesting question! Smile | :) The issue is that contrary to what one might expect, typedef const Ty* const_pointer does not translate to typedef const int** const_pointer when Ty is int. Instead, it translates to typedef int * const * const_pointer. Consequently, the following code does compile with VC9.

C++
template <typename T>
class Sample
{
public:
	typedef const T* const_pointer;
	typedef const T& const_reference;
	
	const_pointer address( const_reference ref ) const
	{
		return &ref;
	}
};

int main()
{
	Sample<int*> s1;
	int val = 10;
	int * const pval = &val;
	int * const &  ref = pval;

	int * const * p = s1.address( ref );	
	return 0;
}


--
gleat
http://blogorama.nerdworks.in[^]
--

Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG


Questionnew / delete : when to delted in this regard, Pin
ptr_Electron12-Jan-09 1:55
ptr_Electron12-Jan-09 1:55 
AnswerRe: new / delete : when to delted in this regard, Pin
Cedric Moonen12-Jan-09 2:00
Cedric Moonen12-Jan-09 2:00 
AnswerRe: new / delete : when to delted in this regard, Pin
Rajasekharan Vengalil12-Jan-09 2:01
Rajasekharan Vengalil12-Jan-09 2:01 
GeneralRe: new / delete : when to delted in this regard, Pin
ptr_Electron12-Jan-09 2:10
ptr_Electron12-Jan-09 2:10 
GeneralRe: new / delete : when to delted in this regard, Pin
Cedric Moonen12-Jan-09 2:14
Cedric Moonen12-Jan-09 2:14 
GeneralRe: new / delete : when to delted in this regard, Pin
ptr_Electron12-Jan-09 2:15
ptr_Electron12-Jan-09 2:15 
GeneralRe: new / delete : when to delted in this regard, Pin
Cedric Moonen12-Jan-09 2:26
Cedric Moonen12-Jan-09 2:26 
QuestionXP or Vista style progressbar. Pin
Le@rner12-Jan-09 1:37
Le@rner12-Jan-09 1:37 
QuestionRe: XP or Vista style progressbar. Pin
David Crow12-Jan-09 3:08
David Crow12-Jan-09 3:08 
QuestionMixing managed/unmanaged in C++/CLI Pin
Jon Hulatt12-Jan-09 1:22
Jon Hulatt12-Jan-09 1:22 
NewsRe: Mixing managed/unmanaged in C++/CLI Pin
Iain Clarke, Warrior Programmer12-Jan-09 1:32
Iain Clarke, Warrior Programmer12-Jan-09 1:32 
GeneralRe: Mixing managed/unmanaged in C++/CLI Pin
Jon Hulatt12-Jan-09 1:37
Jon Hulatt12-Jan-09 1:37 
QuestionDialog box LAYOUTRTL issue [modified] Pin
Alex@9C12-Jan-09 1:13
Alex@9C12-Jan-09 1:13 
QuestionGerman ANSI/Unicode umlauts in source code [SOLVED] Pin
sashoalm12-Jan-09 0:59
sashoalm12-Jan-09 0:59 
AnswerRe: German ANSI/Unicode umlauts in source code Pin
Iain Clarke, Warrior Programmer12-Jan-09 1:31
Iain Clarke, Warrior Programmer12-Jan-09 1:31 
GeneralRe: German ANSI/Unicode umlauts in source code Pin
sashoalm12-Jan-09 4:08
sashoalm12-Jan-09 4:08 
QuestionProblems with sending UPD Packets over sendto Pin
CrazyDogg11-Jan-09 23:59
CrazyDogg11-Jan-09 23:59 

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.