Click here to Skip to main content
15,883,901 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generali have some question about api MOUSE event. Pin
Jung Seng Won5-Dec-07 16:11
Jung Seng Won5-Dec-07 16:11 
GeneralRe: i have some question about api MOUSE event. Pin
followait5-Dec-07 17:20
followait5-Dec-07 17:20 
GeneralRe: i have some question about api MOUSE event. Pin
Vince Rojas5-Dec-07 18:16
Vince Rojas5-Dec-07 18:16 
GeneralRe: i have some question about api MOUSE event. Pin
Jung Seng Won5-Dec-07 18:57
Jung Seng Won5-Dec-07 18:57 
Generalusing C++ to parse HTML Pin
Tom Paronis5-Dec-07 13:43
Tom Paronis5-Dec-07 13:43 
GeneralRe: using C++ to parse HTML Pin
Hamid_RT5-Dec-07 18:34
Hamid_RT5-Dec-07 18:34 
GeneralRe: using C++ to parse HTML Pin
Tom Paronis6-Dec-07 3:11
Tom Paronis6-Dec-07 3:11 
Generalabusing exceptions Pin
quailsafe5-Dec-07 12:23
quailsafe5-Dec-07 12:23 
hi,

i would like to use exception handling as a non local goto mechanism so i can implement tail calls, but its very slow (msvc 7.1, release build).

can anybody tell me why, whether this is a blind alley, and how to speed things up if it isn't?

cheers

jono
day-one.com

code follows:
====================================================================================

#include <iostream>

enum{SZ=1000};
int integers[SZ];

using std::ostream;
using std::cout;

struct Continuation
{
Continuation(int cont)
:cont_(cont)
{}

int cont_;
};


ostream &tail_call_helper(ostream &os, int &i)
{
os << integers[i++] << ' ';
if(i < SZ)
{
throw Continuation(i);
}
else
{
// do nothing
}
return os;
}

ostream &tail_call_(ostream &os)
{
int i = 0;
while(true)
{
try
{
tail_call_helper(os, i);
}
catch(Continuation c)
{
i = c.cont_;
continue;
}
break;
}
return os;
}




int main(int argc, char* argv[])
{
tail_call_(cout);

return 0;
}
GeneralRe: abusing exceptions Pin
Luc Pattyn5-Dec-07 14:06
sitebuilderLuc Pattyn5-Dec-07 14:06 
GeneralRe: abusing exceptions Pin
quailsafe5-Dec-07 14:37
quailsafe5-Dec-07 14:37 
Questionlink error [modified] Pin
linksys20065-Dec-07 12:13
linksys20065-Dec-07 12:13 
GeneralRe: link error Pin
linksys20065-Dec-07 12:24
linksys20065-Dec-07 12:24 
GeneralRe: link error Pin
Don Box5-Dec-07 17:41
Don Box5-Dec-07 17:41 
GeneralRe: link error Pin
linksys20066-Dec-07 12:12
linksys20066-Dec-07 12:12 
QuestionHow do I get rid of a DLL out of my project? Pin
Tim_at_sbc5-Dec-07 11:32
Tim_at_sbc5-Dec-07 11:32 
AnswerRe: How do I get rid of a DLL out of my project? Pin
Tim_at_sbc5-Dec-07 12:46
Tim_at_sbc5-Dec-07 12:46 
GeneralRe: How do I get rid of a DLL out of my project? Pin
ThatsAlok5-Dec-07 19:46
ThatsAlok5-Dec-07 19:46 
GeneralMap file format Pin
k rentz5-Dec-07 7:58
sussk rentz5-Dec-07 7:58 
QuestionDifferencies in dataplot between GDI and GDI+ while drawing the same coordinates Pin
JS5-Dec-07 7:04
JS5-Dec-07 7:04 
GeneralVC 2008 compiler errors [modified] - SOLVED Pin
Jim Crafton5-Dec-07 4:57
Jim Crafton5-Dec-07 4:57 
GeneralRe: VC 2008 compiler errors [modified] - SOLVED Pin
toxcct5-Dec-07 5:59
toxcct5-Dec-07 5:59 
Generalbackup network files - problem Pin
sgeocla5-Dec-07 3:58
sgeocla5-Dec-07 3:58 
QuestionHow do I load another programs Icon? Pin
RichardS715-Dec-07 2:23
RichardS715-Dec-07 2:23 
QuestionRe: How do I load another programs Icon? Pin
David Crow5-Dec-07 2:27
David Crow5-Dec-07 2:27 
GeneralRe: How do I load another programs Icon? Pin
Iain Clarke, Warrior Programmer5-Dec-07 3:36
Iain Clarke, Warrior Programmer5-Dec-07 3:36 

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.