Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTooltips on Icons of a listbox Pin
muravi2-Sep-06 21:59
muravi2-Sep-06 21:59 
AnswerRe: Tooltips on Icons of a listbox Pin
Waldermort3-Sep-06 8:14
Waldermort3-Sep-06 8:14 
AnswerRe: Tooltips on Icons of a listbox Pin
MIAN KAMRAN6-Sep-06 2:01
MIAN KAMRAN6-Sep-06 2:01 
QuestionHandle Message of a Window via its handle Pin
A_Fa2-Sep-06 21:36
A_Fa2-Sep-06 21:36 
AnswerRe: Handle Message of a Window via its handle Pin
Waldermort2-Sep-06 22:01
Waldermort2-Sep-06 22:01 
GeneralRe: Handle Message of a Window via its handle Pin
A_Fa2-Sep-06 22:06
A_Fa2-Sep-06 22:06 
AnswerRe: Handle Message of a Window via its handle Pin
Nader Elshehabi2-Sep-06 23:31
Nader Elshehabi2-Sep-06 23:31 
QuestionPERFORMANCE PROBLEM C# vs C++ Pin
kobi10i102-Sep-06 20:55
kobi10i102-Sep-06 20:55 
i wrote the same code both in VISUALL C++ AND C#. in both cases, the OPTIMIZED SWITCH is turned on. the results: in C#, around 300 msec, in c++ less then 1 msec.
what is happening here??? in general i need to process 4 megabyte each 250 msec, and it looks likt c# is not the answer... or maybe there is another optimize switch in c# i am not aware of (beside the one in the BUILD TAB). can someone please advice? is it true c# is not good for real time?

THE CODE in visual studio 2005 c#:
===================================================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics ;

namespace ConsoleApplication10
{
class Program
{
static void Main(string[] args)
{
byte []byte1=new byte[2097152*2];
byte[] byte2=new byte[2097152*2];
Stopwatch sw=new Stopwatch ();
sw.Start ();

for(int i=0;i<2097152*2;i++)
{
for(int y=0;y<64;y++)
{
if(byte1[y]==byte2[y])
//if (*(bytes1+i)==*(bytes2+i))
{
}
}

}
sw.Stop ();
Console.Write ("{0}",sw.ElapsedMilliseconds ) ;
Console.ReadKey ();
}
}
}

THE CODE IN VISUALL C++ 2005:
===============================

#include "stdafx.h"



#using <system.dll>
#using <system.drawing.dll>
#using <system.windows.forms.dll>

using namespace System;
using namespace System::Diagnostics;
using namespace System::Windows::Forms;
using namespace System::Drawing;
using namespace System::Drawing::Drawing2D;


int _tmain(int argc, _TCHAR* argv[])
{

char *bytes1=new char[2097152*2];
char *bytes2=new char[2097152*2];

Stopwatch^ stopWatch;
stopWatch = gcnew Stopwatch;
stopWatch->Start ();

//for (int u=0;u<10000;u++)
for (int i=0;i<2097152*2;i++)
{
for (int y=0;y<64;y++)
{
if (bytes1[y]==bytes2[y])
//if (*(bytes1+i)==*(bytes2+i))
{
}
}

}

long ii;
ii =(long)stopWatch->ElapsedMilliseconds;
stopWatch->Stop ();
printf("%d",ii);
//ElapsedMilliseconds Ticks


return 0;
}
Questionvisual c++ beginner Pin
frankis782-Sep-06 20:37
frankis782-Sep-06 20:37 
AnswerRe: visual c++ beginner Pin
Rilhas8-Sep-06 9:42
Rilhas8-Sep-06 9:42 
GeneralRe: visual c++ beginner Pin
frankis788-Sep-06 10:34
frankis788-Sep-06 10:34 
Questionbackground color to button Pin
radhika282-Sep-06 20:31
radhika282-Sep-06 20:31 
AnswerRe: background color to button Pin
prasad_som4-Sep-06 2:10
prasad_som4-Sep-06 2:10 
QuestionDo you still remember ellipse math of University? Pin
includeh102-Sep-06 20:23
includeh102-Sep-06 20:23 
AnswerRe: Do you still remember ellipse math of University? Pin
Gary R. Wheeler3-Sep-06 4:19
Gary R. Wheeler3-Sep-06 4:19 
QuestionConvert ascii (1 byte) to 2 bytes Pin
lorey2-Sep-06 18:10
lorey2-Sep-06 18:10 
AnswerRe: Convert ascii (1 byte) to 2 bytes Pin
Waldermort2-Sep-06 19:40
Waldermort2-Sep-06 19:40 
GeneralRe: Convert ascii (1 byte) to 2 bytes Pin
lorey3-Sep-06 6:40
lorey3-Sep-06 6:40 
GeneralRe: Convert ascii (1 byte) to 2 bytes Pin
Waldermort3-Sep-06 7:59
Waldermort3-Sep-06 7:59 
Questionabout template Pin
rxgmoral2-Sep-06 17:56
rxgmoral2-Sep-06 17:56 
AnswerRe: about template Pin
Stephen Hewitt2-Sep-06 18:58
Stephen Hewitt2-Sep-06 18:58 
Questioninsert a value into binary file Pin
samkook2-Sep-06 17:08
samkook2-Sep-06 17:08 
AnswerRe: insert a value into binary file Pin
samkook10-Sep-06 11:23
samkook10-Sep-06 11:23 
QuestionCPP Name Decoration Pin
Bram van Kampen2-Sep-06 14:30
Bram van Kampen2-Sep-06 14:30 
AnswerRe: CPP Name Decoration Pin
Jörgen Sigvardsson2-Sep-06 14:37
Jörgen Sigvardsson2-Sep-06 14:37 

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.