Click here to Skip to main content
15,888,803 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
Question[Message Deleted] Pin
Herboren11-Sep-07 14:16
Herboren11-Sep-07 14:16 
AnswerRe: Understanding pointers Pin
George L. Jackson11-Sep-07 17:52
George L. Jackson11-Sep-07 17:52 
AnswerRe: Understanding pointers Pin
Hamid_RT12-Sep-07 23:07
Hamid_RT12-Sep-07 23:07 
AnswerRe: [Message Deleted] Pin
Russell'13-Sep-07 22:19
Russell'13-Sep-07 22:19 
GeneralRe: [Message Deleted] Pin
George L. Jackson14-Sep-07 11:36
George L. Jackson14-Sep-07 11:36 
GeneralRe: [Message Deleted] Pin
Russell'14-Sep-07 22:29
Russell'14-Sep-07 22:29 
Questionsetup project Pin
Franken10-Sep-07 9:15
Franken10-Sep-07 9:15 
QuestionHelp me about " template" Pin
ubriela10-Sep-07 5:26
ubriela10-Sep-07 5:26 
How can I use the word string as a data type, like int?
C++ does not support it? ?
#define string char * ????? // some time it is wrong
Suppose that I have a header file for a template class: dummy.h

#ifndef DUMMY_H_
#define DUMMY_H_
// phototype
template<class t="">
class dummy
{
dummy();
public:
void read();
// void get_value(T&);
private:
T value;
}
// Implimentation
.......
template<class t="">
void dummy<t>::read()
{
cin>>value;
}
.......
#endif

// test
#define string char *
main()
{
dummy<string> name; // object name
name.read(); // -> an error occurs
.......
}

Why is that? if I replace string by int
dummy<int> name;
name.read() // NO PROBLEM

I knew my fault.... cin>>name can't be used for char * (pointer)
but I want to use string as a data type, so that I can declare: dummy<string> name;
Can you have me?
thanks a lot....


ubri

AnswerRe: Help me about " template" Pin
Mark Salsbery10-Sep-07 5:46
Mark Salsbery10-Sep-07 5:46 
QuestionRe: Help me about " template" Pin
Hamid_RT12-Sep-07 23:10
Hamid_RT12-Sep-07 23:10 
Questionusb otg??? Pin
kutalinelucas10-Sep-07 1:24
kutalinelucas10-Sep-07 1:24 
AnswerRe: usb otg??? Pin
Mark Salsbery10-Sep-07 5:49
Mark Salsbery10-Sep-07 5:49 
Questionredefinition error (Library) Pin
palanirajan10-Sep-07 0:03
palanirajan10-Sep-07 0:03 
AnswerRe: redefinition error (Library) Pin
Mark Salsbery10-Sep-07 5:51
Mark Salsbery10-Sep-07 5:51 
QuestionHelp with accessing COM component. Pin
art_ami9-Sep-07 19:28
art_ami9-Sep-07 19:28 
QuestionHelp with C program [modified] Pin
eitwoman8-Sep-07 13:21
eitwoman8-Sep-07 13:21 
AnswerRe: Help with C program Pin
Mark Salsbery9-Sep-07 7:54
Mark Salsbery9-Sep-07 7:54 
GeneralRe: Help with C program Pin
eitwoman10-Sep-07 1:59
eitwoman10-Sep-07 1:59 
AnswerRe: Help with C program Pin
Mark Salsbery10-Sep-07 6:53
Mark Salsbery10-Sep-07 6:53 
GeneralRe: Help with C program Pin
eitwoman10-Sep-07 10:00
eitwoman10-Sep-07 10:00 
QuestionArray and String Pin
pourang7-Sep-07 21:58
pourang7-Sep-07 21:58 
AnswerRe: Array and String Pin
ubriela7-Sep-07 23:00
ubriela7-Sep-07 23:00 
GeneralRe: Array and String Pin
George L. Jackson8-Sep-07 5:27
George L. Jackson8-Sep-07 5:27 
GeneralRe: Array and String Pin
pourang10-Sep-07 4:20
pourang10-Sep-07 4:20 
AnswerRe: Array and String Pin
George L. Jackson8-Sep-07 5:23
George L. Jackson8-Sep-07 5:23 

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.