Click here to Skip to main content
16,011,436 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalkeyboard Pin
viliam2-Dec-03 22:35
viliam2-Dec-03 22:35 
GeneralRe: keyboard Pin
BaldwinMartin2-Dec-03 22:46
BaldwinMartin2-Dec-03 22:46 
GeneralRe: keyboard Pin
viliam2-Dec-03 23:25
viliam2-Dec-03 23:25 
Generalcompilation speed vs6 vs. vs.net 2003 Pin
niklo2-Dec-03 22:28
niklo2-Dec-03 22:28 
GeneralRe: compilation speed vs6 vs. vs.net 2003 Pin
Antti Keskinen3-Dec-03 2:59
Antti Keskinen3-Dec-03 2:59 
GeneralRe: compilation speed vs6 vs. vs.net 2003 Pin
niklo3-Dec-03 3:06
niklo3-Dec-03 3:06 
GeneralRe: compilation speed vs6 vs. vs.net 2003 Pin
Antti Keskinen3-Dec-03 3:22
Antti Keskinen3-Dec-03 3:22 
GeneralRe: compilation speed vs6 vs. vs.net 2003 Pin
niklo3-Dec-03 3:56
niklo3-Dec-03 3:56 
I really need to learn telling people all facts! Yes, I ran the apps from the shell! The mandelbrot test produced the timing: vc.net 4.196s and vc6.0 1.482s

Still I don't know if this is a real problem or just a demo "feature"!? If it's real it's no good!

The code:

// test1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <windows.h>

#define WIDTH 100
#define HEIGHT 100
#define ITER 10000

void mandel()
{
double x,y;
double xstart,xstep,ystart,ystep;
double xend,yend;
double z,zi,newz,newzi;
int i,j,k;

xstart = -2;
xend = 2;
ystart = -2;
yend = 2;

/* these are used for calculating the points corresponding to the pixels */
xstep = (xend-xstart)/WIDTH;
ystep = (yend-ystart)/HEIGHT;

/*the main loop */
x = xstart;
y = ystart;
for (i=0; i<height; i++)
="" {
="" for="" (j="0;" j<width;="" j++)
="" z="0;
" zi="0;
" (k="0;" k<iter;="" k++)
="" *="" z^2="(a+bi)(a+bi)" =="" a^2="" +="" 2abi="" -="" b^2=""
="" newz="(z*z)-(zi*zi)" x;
="" newzi="2*z*zi" y;
="" break
="" if(((z*z)+(zi*zi))=""> 4)
{
// no break here always calculate everything!!!
}
#endif
}
x += xstep;
}
y += ystep;
x = xstart;
}
}

int _tmain(int argc, _TCHAR* argv[])
{
unsigned long t;

t = ::GetTickCount();
mandel();
t = GetTickCount() - t;
printf("%u", t);

return 0;
}
Generalopen dialog.. Pin
R. Thomas2-Dec-03 21:23
R. Thomas2-Dec-03 21:23 
GeneralRe: open dialog.. Pin
BaldwinMartin2-Dec-03 22:48
BaldwinMartin2-Dec-03 22:48 
GeneralRe: open dialog.. Pin
R. Thomas3-Dec-03 5:41
R. Thomas3-Dec-03 5:41 
GeneralRe: open dialog.. Pin
BaldwinMartin3-Dec-03 5:50
BaldwinMartin3-Dec-03 5:50 
GeneralRe: open dialog.. Pin
R. Thomas3-Dec-03 15:50
R. Thomas3-Dec-03 15:50 
GeneralRe: open dialog.. Pin
BaldwinMartin4-Dec-03 1:35
BaldwinMartin4-Dec-03 1:35 
GeneralOpen Program @ File Pin
Best Friend2-Dec-03 21:22
Best Friend2-Dec-03 21:22 
GeneralRe: Open Program @ File Pin
RChin2-Dec-03 22:32
RChin2-Dec-03 22:32 
GeneralSimple dialo app, memory leak Pin
J.B.2-Dec-03 21:13
J.B.2-Dec-03 21:13 
GeneralRe: Simple dialo app, memory leak Pin
Anonymous2-Dec-03 21:22
Anonymous2-Dec-03 21:22 
GeneralRe: Simple dialo app, memory leak Pin
J.B.2-Dec-03 21:43
J.B.2-Dec-03 21:43 
GeneralRe: Simple dialo app, memory leak Pin
Marek Grzenkowicz2-Dec-03 21:23
Marek Grzenkowicz2-Dec-03 21:23 
Questionhow to get the message for window show? Pin
zecodela2-Dec-03 20:57
zecodela2-Dec-03 20:57 
AnswerRe: how to get the message for window show? Pin
BaldwinMartin2-Dec-03 22:50
BaldwinMartin2-Dec-03 22:50 
Generalscrolling logic Pin
R. Thomas2-Dec-03 20:48
R. Thomas2-Dec-03 20:48 
Questionmapping mode prob? Pin
R. Thomas2-Dec-03 20:40
R. Thomas2-Dec-03 20:40 
QuestionHow do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
dowa2-Dec-03 19:53
dowa2-Dec-03 19:53 

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.