Click here to Skip to main content
16,016,168 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Regarding CHyperLink example Pin
David Crow16-May-08 5:29
David Crow16-May-08 5:29 
GeneralRe: Regarding CHyperLink example Pin
H4u3217-May-08 1:09
H4u3217-May-08 1:09 
QuestionToolTip Pin
john563215-May-08 21:39
john563215-May-08 21:39 
AnswerRe: ToolTip Pin
Iain Clarke, Warrior Programmer15-May-08 22:50
Iain Clarke, Warrior Programmer15-May-08 22:50 
GeneralRe: ToolTip Pin
john563215-May-08 22:57
john563215-May-08 22:57 
GeneralRe: ToolTip Pin
Iain Clarke, Warrior Programmer15-May-08 23:19
Iain Clarke, Warrior Programmer15-May-08 23:19 
AnswerRe: ToolTip Pin
Hamid_RT15-May-08 23:24
Hamid_RT15-May-08 23:24 
QuestionTemplate Argument Problem Pin
Sarath C15-May-08 21:22
Sarath C15-May-08 21:22 
I've created function as follows

template <class t="">
void BubbleSort(int nArraySize)
{
    // Reading Data
    T* pArray = new T[nArraySize];
    int nIdx;
    cout<<"Enter the items to be sorted"<<endl;
    for ( nIdx = 0;nIdx < nArraySize;nIdx++)
    {
        cin>>pArray[nIdx];
    }
....
}
</class>

and called this function as follows

int main()
{
    int x;
    cin >> x;
    switch( x )
    {
    case 1:
        BubbleSort<float>( 3 );
        break;
    case 2:
        BubbleSort<int> ( 3 );
    default:
        break;
    }
}</int></float>


This code works fine with Visual C++ 2008 and Dev C++ compiler.

cin>>Array[nIdx]; breaks when I compile and execute the code using Visual C++ 6.0

Is there any work around for this problem? or something missing with my usage?

-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin

AnswerRe: Template Argument Problem Pin
Stephen Hewitt15-May-08 21:31
Stephen Hewitt15-May-08 21:31 
GeneralRe: Template Argument Problem Pin
Sarath C15-May-08 22:43
Sarath C15-May-08 22:43 
GeneralRe: Template Argument Problem Pin
prasad_som16-May-08 0:31
prasad_som16-May-08 0:31 
GeneralRe: Template Argument Problem Pin
Stephen Hewitt18-May-08 14:21
Stephen Hewitt18-May-08 14:21 
QuestionError while converting int to string... Pin
pl_kode15-May-08 21:12
pl_kode15-May-08 21:12 
AnswerRe: Error while converting int to string... Pin
_AnsHUMAN_ 15-May-08 21:24
_AnsHUMAN_ 15-May-08 21:24 
GeneralRe: Error while converting int to string... Pin
Stephen Hewitt15-May-08 21:34
Stephen Hewitt15-May-08 21:34 
AnswerRe: Error while converting int to string... Pin
Rajesh R Subramanian15-May-08 21:25
professionalRajesh R Subramanian15-May-08 21:25 
AnswerRe: Error while converting int to string... Pin
CPallini15-May-08 21:28
mveCPallini15-May-08 21:28 
QuestionHow to Draw in CMDIFrameWnd Pin
santhoshv8415-May-08 21:04
santhoshv8415-May-08 21:04 
AnswerRe: How to Draw in CMDIFrameWnd Pin
ShilpiP15-May-08 21:38
ShilpiP15-May-08 21:38 
QuestionProblem with Releaseversion of FlexGrid Pin
sunny_vc15-May-08 20:33
sunny_vc15-May-08 20:33 
AnswerRe: Problem with Releaseversion of FlexGrid Pin
chandu00415-May-08 20:59
chandu00415-May-08 20:59 
GeneralRe: Problem with Releaseversion of FlexGrid Pin
sunny_vc15-May-08 21:18
sunny_vc15-May-08 21:18 
GeneralRe: Problem with Releaseversion of FlexGrid Pin
chandu00415-May-08 21:23
chandu00415-May-08 21:23 
GeneralRe: Problem with Releaseversion of FlexGrid Pin
sunny_vc15-May-08 21:31
sunny_vc15-May-08 21:31 
GeneralRe: Problem with Releaseversion of FlexGrid Pin
chandu00415-May-08 21:41
chandu00415-May-08 21:41 

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.