Click here to Skip to main content
15,921,694 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ program Pin
toxcct16-Oct-04 6:58
toxcct16-Oct-04 6:58 
GeneralRe: C++ program Pin
Leyu17-Oct-04 6:30
Leyu17-Oct-04 6:30 
GeneralRe: C++ program Pin
Aamir Butt17-Oct-04 21:44
Aamir Butt17-Oct-04 21:44 
GeneralC++ program Pin
namoorthy16-Oct-04 3:50
namoorthy16-Oct-04 3:50 
GeneralRe: C++ program Pin
Mad__18-Oct-04 0:34
Mad__18-Oct-04 0:34 
Generalmake a sound event Pin
mark18216-Oct-04 3:49
mark18216-Oct-04 3:49 
GeneralRe: make a sound event Pin
PJ Arends16-Oct-04 7:21
professionalPJ Arends16-Oct-04 7:21 
Generalcant't compile with vs 6.0 Pin
morten4116-Oct-04 3:00
morten4116-Oct-04 3:00 
hello programmers,

the last code snippet from here:

http://www.codeproject.com/cpp/CPPMathFun.asp

woun't compile ,

here it is:


#include
using std::cout;
using std::endl;

template<int n="">
class CalculateCycle
{
public:
enum { count = CalculateCycle&t N % 2 ?
(N * 3 + 1) : (N / 2) >::count + 1 };
};

template <>
class CalculateCycle<1>
{
public:
enum { count = 1 };
};

int main(int argc, char* argv[])
{
const int iNo = 22;
cout << "Cycle length of " << iNo << " is = "
<< CalculateCycle<ino>::count << endl;

return 0;
}



the article is called
Template Meta-programming


please help, what can I do ?



// Lord Byte has started to code
void swap(char **p, char **q)
{
char *tmp;

tmp = *p;
*p = *q;
*q = tmp;
}
QuestionHow to write to data to a text file Pin
pork chop16-Oct-04 2:54
pork chop16-Oct-04 2:54 
AnswerRe: How to write to data to a text file Pin
Gary R. Wheeler16-Oct-04 3:00
Gary R. Wheeler16-Oct-04 3:00 
GeneralHelp with program structure Pin
ryuki16-Oct-04 0:53
ryuki16-Oct-04 0:53 
GeneralRe: Help with program structure Pin
Mad__16-Oct-04 1:10
Mad__16-Oct-04 1:10 
GeneralRe: Help with program structure Pin
ryuki16-Oct-04 11:52
ryuki16-Oct-04 11:52 
GeneralRe: Help with program structure Pin
Mad__18-Oct-04 0:16
Mad__18-Oct-04 0:16 
GeneralOne dialog after the other in mfc dialog app Pin
Anonymous16-Oct-04 0:50
Anonymous16-Oct-04 0:50 
GeneralRe: One dialog after the other in mfc dialog app Pin
Mad__16-Oct-04 1:49
Mad__16-Oct-04 1:49 
GeneralRe: One dialog after the other in mfc dialog app Pin
Maximilien16-Oct-04 2:33
Maximilien16-Oct-04 2:33 
GeneralGDI resource problem Pin
Leyu16-Oct-04 0:29
Leyu16-Oct-04 0:29 
GeneralRe: GDI resource problem Pin
PJ Arends16-Oct-04 7:34
professionalPJ Arends16-Oct-04 7:34 
GeneralRe: GDI resource problem Pin
16-Oct-04 18:18
suss16-Oct-04 18:18 
GeneralRe: GDI resource problem Pin
PJ Arends16-Oct-04 23:35
professionalPJ Arends16-Oct-04 23:35 
Generalsound event/alerts Pin
mark18215-Oct-04 21:19
mark18215-Oct-04 21:19 
GeneralRe: sound event/alerts Pin
Sujan Christo15-Oct-04 22:32
Sujan Christo15-Oct-04 22:32 
GeneralProblem with the tree Control Pin
Azghar Hussain15-Oct-04 20:15
professionalAzghar Hussain15-Oct-04 20:15 
GeneralRe: Problem with the tree Control Pin
Ravi Bhavnani15-Oct-04 21:06
professionalRavi Bhavnani15-Oct-04 21:06 

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.