|
Actually it was. The 80386 processors and their descendents included direct 32-bit arithmetic and pointer support. The Watcom compiler supported protected mode execution with a flat memory model for a variety of DOS extenders. A "DOS extender" basically provided an execution environment for a protected mode application in the MS-DOS environment.
DavidCrow wrote: Microsoft's compiler mashes two 32-bit ints together
Hmm. Is that still the case? I was under the impression that __int64 support since VS.NET 2002 was provided directly by native instructions.
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
Gary R. Wheeler wrote: Is that still the case?
I'm not sure since I only use VC++ v6.
Gary R. Wheeler wrote: I was under the impression that __int64 support since VS.NET 2002 was provided directly by native instructions.
Even on processors that do not a have 64-bit bus?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Probably i would preffer to say
implementation dependent then
processor dependent .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: Probably i would preffer to say
implementation dependent then
processor dependent .
yes but the implementation is dependent on the processor.
-Prakash
|
|
|
|
|
The most important thing to do is to always use the "sizeof" operation in any code you're referring to. Never, ever hardcode the size into your code. When reading/writing to a file - there are exceptions -- in general, avoid using "int" as a type when it comes to storage of data structures. Instead, define types such as DWORD, WORD, BYTE, etc. This will save you a lot of trouble down the road.
Read more of what I have to say at http://directx9.blogspot.com/
|
|
|
|
|
segment_fault wrote: The most important thing to do is to always use the "sizeof" operation in any code you're referring to. Never, ever hardcode the size into your code. When reading/writing to a file - there are exceptions -- in general, avoid using "int" as a type when it comes to storage of data structures. Instead, define types such as DWORD, WORD, BYTE, etc. This will save you a lot of trouble down the road.
yes i know that.
-Prakash
|
|
|
|
|
Hi everybody,
I have a sensor to capture the fingerprint image and then send to PC via Serial COM Port. And I use MSCOMM Control 6.0 for transfering & receiving data in Serial COM Port. Here below is the structure of the data which the sensor send to me :
HEADER : 6 bytes
DATA : Fingerprint Image 280 x 240 = 67200 bytes !!!
FOOTER : 4 bytes
But the buffer of MSCOMM Control is only 32768 ( = 2^15 ). Therefore, now my problem is the size of that image is too large to receive in buffer. The buffer is overflow !!! In this situation, I think there are 3 ways to solve it :
+ Incearse the size of the MSCOMM's buffer.
+ Use other class for transfering & receiving data in Serial COM Port with the buffer enough large.
+ Parallel processing : doing both receiving data from sensor and saving data from buffer to other place ... simultaneously.
But I don't know how to implement above methods !!! Please kindly help me or you can show me other solutions ... THIS IS MY FINAL PROJECT FOR GRADUATING MY UNIVERSITY and the deadline is coming nearly, so, again, please help me !!!
Thank you very much !!!
Best regards,
Quang Dien
Email to me : quangdien12jan@yahoo.com
|
|
|
|
|
Did you try searching Code Project[^]?
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
I could not get what is the wrong in this?
Please let me know.
I am getting the error as follows.
error C3861: 'sprintf': identifier not found, even with argument-dependent lookup
TCHAR str1[50]=_T("");
_stprintf(str1,_T("The Sum is %d"),Add(10,20));
MessageBox(NULL,str1,_T("Add"),NULL); Here I Like to use _stprintf. How to use it?
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
G Haranadh wrote: _stprintf(str1,_T("The Sum is %d"),Add(10,20));
Try this...
_stprintf(str1,L"The Sum is %d",Add(10,20));
Hope this works
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
: error C3861: 'sprintf': identifier not found, even with argument-dependent lookup
: error C3861: 'L': identifier not found, even with argument-dependent lookup
Sorry. it gave two errors.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
lol
It is working fine here. Not the one I suggested but the one you gave
TCHAR str1[50]=_T("");
_stprintf(str1,_T("The Sum is %d"),Add(10,20));
MessageBox(NULL,str1,_T("Add"),NULL);
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
_stprintf(str1,L"The Sum is %d",Add(10,20));
use swprintf instead of _stprintf if u r using L"The Sum is%d"
|
|
|
|
|
Hope you included stdio.h header file.
and plus try using stprintf instead of _stprintf
<hr<span style="color:gray;size:15px;">-Prakash
-Prakash
-- modified at 11:39 Wednesday 28th December, 2005
|
|
|
|
|
did u include <stdio.h>
have u tried this
char *str1="";
sprintf(str1,"The Sum is %d",Add(10,20));
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I feel it wont work
char *str1="" is equivalent to const char *str
that means we cannot change the content of the address stored in str
|
|
|
|
|
Yeh u r right
but this works i have done it
int Add(int a,int b)<br />
{<br />
return a+b;<br />
}<br />
<br />
char str1[100];<br />
sprintf(str1,"The Sum is %d",Add(10,20));<br />
MessageBox(NULL,str1,_T("Add"),NULL);
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
it will work in case of array
there is a diff b/w array and pointer.No doubt in some cases array boils down to pointer
never say die
|
|
|
|
|
sunit5 wrote: char *str1="" is equivalent to const char *str
try this :-
const char *str1="";
char str[]="alok";
str1=str;
MessageBox(str1);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
yes in this case it will work
as char *str1!= char *const str1
never say die
|
|
|
|
|
vikas amin wrote: char *str1="";
sprintf(str1,"The Sum is %d",Add(10,20));
I think an exception will be raised coz str1 is just a pointer and no memory allocated for the result to be stored.
-Prakash
|
|
|
|
|
if u try in gcc compiler it will give u segmentation fault a well known nightmare error in Linux/Unix
never say die
|
|
|
|
|
Are you sure you did this:
#include <tchar.h>
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
Hello; Thanks for all. I got the solution.
------------------
Previous code is
#include < tchar.h >
#include < stdio.h >
#include "stdafx.h"
Which is wrong.
------------------
Present code is
#include "stdafx.h"
#include < tchar.h >
#include < stdio.h >
Which is correct.
------------------
Oh. Sorry for my mistake and Thanks for All.
Advance Happy new year to all
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
-- modified at 13:07 Wednesday 28th December, 2005
|
|
|
|
|
hi,
can anyone tell me how to make a dialogbox (modal and non modal) fade in ?
I have heard that you can do it with AnimateWindow() , but there is not much code around and MSDN isn't helping much either.
thanks for the replies in advance
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|