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

C / C++ / MFC

 
Answer[Message Deleted] Pin
Hamid_RT12-Jan-09 3:26
Hamid_RT12-Jan-09 3:26 
GeneralRe: Get the machine name of the mapped drive C++ Pin
Iain Clarke, Warrior Programmer12-Jan-09 4:03
Iain Clarke, Warrior Programmer12-Jan-09 4:03 
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 
Hi All,
Did anyone of u ever faced any similar issue.
One of my template class funciton is overloaded...But after instantiating with a pointer, i'm not able to call the overloaded function.
ex:
template<typename Ty>
class sample
{
public:
typedef Ty& reference;
typedef Ty* pointer;
typedef const Ty* const_pointer;
typedef const Ty& const_reference;


pointer address(reference p_data_r) const
{
return &p_data_r;
}

const_pointer address(const_reference p_data_r) const
{
return &p_data_r;
}

};

int main()
{
sample<int*> sample_obj;
//Calling address with const pointer
const int* iptr=new int();
const int* &const_reference=iptr;
const int**const_pointer = sample_obj.address(const_reference);
return 0;
}

Error Message::
error C2664: 'int *sample<Ty>::address(int &) const' : cannot convert parameter 1 from 'const int *' to 'int &'
1> with
1> [
1> Ty=int *
1> ]
1> Conversion loses qualifiers

Let me know your suggestions...

Thanks alot.
Shakeel
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 
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 

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.