Click here to Skip to main content
15,895,799 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: InvalidateRect and GDI Pin
LighthouseJ7-Oct-05 4:15
LighthouseJ7-Oct-05 4:15 
GeneralRe: InvalidateRect and GDI Pin
James Brown6-Oct-05 21:56
James Brown6-Oct-05 21:56 
QuestionMFC DLL question Pin
benjnp6-Oct-05 14:57
benjnp6-Oct-05 14:57 
AnswerRe: MFC DLL question Pin
Prakash Nadar6-Oct-05 15:44
Prakash Nadar6-Oct-05 15:44 
QuestionObjects Pin
kenexcelon6-Oct-05 14:10
kenexcelon6-Oct-05 14:10 
AnswerRe: Objects Pin
Prakash Nadar6-Oct-05 15:40
Prakash Nadar6-Oct-05 15:40 
AnswerRe: Objects Pin
Cedric Moonen6-Oct-05 20:39
Cedric Moonen6-Oct-05 20:39 
QuestionWhat's wrong in my code or in VS.NET2003 C++ compiler Pin
Zhaohui Xing (Joey)6-Oct-05 11:40
Zhaohui Xing (Joey)6-Oct-05 11:40 
I compile the following C++ code VS.NET2003 IDE and the compiler enter an infinit/endless compiling process, What's wrong within it?
The code is given as following:
//The testtempl.h
#ifndef __TESTTEMPL_H__
#define __TESTTEMPL_H__

#include <stdlib.h>
#include <stdio.h>
#include <vector>

template<int n> class MyTempl
{
public:
std::vector<int> m_array;

public:
MyTempl()
{
m_array.assign(n, n);
}

int Summation()
{
int rn = 0;

for(int i = 0; i < (int)m_array.size(); i++)
rn += m_array[i];

return rn;
}

int Foo()
{
if(n <= 1)
return 1;
else
{
int r = 0;

MyTempl<n-1> mtempl;
r = mtempl.Foo()*Summation();
return r;
}
}
};

typedef MyTempl<4> My4Foo;

#endif

//The testtempl.cpp file
#include "testtempl.h"

int main(int argc, char* argv[])
{
My4Foo myfoo;

int i = myfoo.Foo();

printf("foo value: %u\n", i);

return 0;
}

-- modified at 19:25 Thursday 6th October, 2005
AnswerRe: What's wrong in my code or in VS.NET2003 C++ compiler Pin
Christian Graus6-Oct-05 12:41
protectorChristian Graus6-Oct-05 12:41 
GeneralRe: What's wrong in my code or in VS.NET2003 C++ compiler Pin
Jose Lamas Rios6-Oct-05 18:55
Jose Lamas Rios6-Oct-05 18:55 
QuestionDebugging Media Center Pin
DNFSB6-Oct-05 10:10
DNFSB6-Oct-05 10:10 
QuestionBoost Pin
Ed K6-Oct-05 10:00
Ed K6-Oct-05 10:00 
AnswerRe: Boost Pin
Nemanja Trifunovic6-Oct-05 10:25
Nemanja Trifunovic6-Oct-05 10:25 
AnswerRe: Boost Pin
Joaquín M López Muñoz6-Oct-05 11:24
Joaquín M López Muñoz6-Oct-05 11:24 
Questionmotion capturing and rendering Pin
Ashwin Waghela6-Oct-05 8:56
Ashwin Waghela6-Oct-05 8:56 
AnswerRe: motion capturing and rendering Pin
Colonel Walter E. Kurtz6-Oct-05 11:47
Colonel Walter E. Kurtz6-Oct-05 11:47 
GeneralRe: motion capturing and rendering Pin
Gunnery Sergeant Hartman6-Oct-05 15:16
Gunnery Sergeant Hartman6-Oct-05 15:16 
GeneralRe: motion capturing and rendering Pin
Colonel Walter E. Kurtz6-Oct-05 15:29
Colonel Walter E. Kurtz6-Oct-05 15:29 
GeneralRe: motion capturing and rendering Pin
Gunnery Sergeant Hartman6-Oct-05 15:35
Gunnery Sergeant Hartman6-Oct-05 15:35 
GeneralRe: motion capturing and rendering Pin
Colonel Walter E. Kurtz6-Oct-05 15:45
Colonel Walter E. Kurtz6-Oct-05 15:45 
GeneralRe: motion capturing and rendering Pin
Gunnery Sergeant Hartman6-Oct-05 15:48
Gunnery Sergeant Hartman6-Oct-05 15:48 
GeneralRe: motion capturing and rendering Pin
Colonel Walter E. Kurtz6-Oct-05 15:53
Colonel Walter E. Kurtz6-Oct-05 15:53 
GeneralRe: motion capturing and rendering Pin
Gunnery Sergeant Hartman6-Oct-05 15:58
Gunnery Sergeant Hartman6-Oct-05 15:58 
GeneralRe: motion capturing and rendering Pin
ThatsAlok6-Oct-05 18:15
ThatsAlok6-Oct-05 18:15 
AnswerRe: motion capturing and rendering Pin
Trollslayer6-Oct-05 12:40
mentorTrollslayer6-Oct-05 12:40 

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.