|
In fact if you have a char, it is already an int. You can't find anything because it works all by itself. The CString.Format function, the ostringstream or sprintf will all convert a number to a hex string.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
samkook wrote: take a char and tell me it's decimal value
char c = 'a';
int i = c;
or
char c = 'a';
CString t;
t.Format("%x", (int)c);
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
There is a hexadecimal editor around here some where (search the articles).
A character is an interger value by default. Yes it may be contained in a single-byte (in english), but it is still an interger. The conversion is just for viewing purposes only and there are functions for doing the conversion.
Writing your own function is easy, if you can not find a compliter specific one..
P.S. Decimal implies that a decimal point is involved (A.K.A. floar, double precision), characters are interger values not decimal valuse.
INTP
Every thing is relative...
|
|
|
|
|
does this still work with wide char?
because I need to display japanese chars and it doesn't seems to work since i get result higher than 65535. But it's true i didn't test it a lot .
|
|
|
|
|
Your original question just went out the window.
Well that is not entirley true, if you are still talking about a hexadecimal editor, becuase an hexadecimal editor deals with bytes, not characters. Which in the case of japanese, may be one or two bytes. I can see where that may be a problem, but a hexadecimal editor does not care about character values, all it cares about is the individual byte values.
Look I started to say a whole lot more on languages, but you're talking about a hexedeciamal editor and not an (ASSII) text editor.
INTP
Every thing is relative...
|
|
|
|
|
Why not create a pointer of the type you want to convert to and then point it to the address of the data currently selected? There's a feature like that in a freeware hex editor I always use called XVI32. You can pull up a floating window that takes whatever byte is selected and tells me what it is in unsigned char (1-byte), short (2-byte), int (4-byte), unsigned int, (4-byte), etc... That site is down at the moment but try later because it's a really useful editor, I keep a copy at hand at all times.
|
|
|
|
|
LighthouseJ wrote: Why not create a pointer of the type you want to convert to and then point it to the address of the data currently selected?
Come on, life is hard enough, don't make it more confusioning. The fact that I even understod what you said, worries me.
INTP
Every thing is relative...
|
|
|
|
|
Ok, forget all of what I said when I started replying. I was a bit confused. My original question is answered and thanks for that.
Now I have another problem, i'm trying to display japanese in shift-jis(not unicode so i don't need wchar), but i can't manage to display the text correctly.
|
|
|
|
|
Hi,everyone:
Could you tell how to remove all my program's breakpoint in Visual C++ 6.0? thank you!
your friend:bobi
|
|
|
|
|
edit/breakpoints/remove all.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ahhh, an actual VC6.0 question!
Question: Do you know if that stops the brake points built into the libararies. What I mean is that there is a fuction call that can set a break point. Example: I have no break points set and yet the debugger stops at some assembly code line (without source).
Sorry, just curious! If you know, I would be supprised, because I do not know. Plus the fact that they are there (which they are) then there must be a reason.
INTP
Every thing is relative...
|
|
|
|
|
John R. Shaw wrote: What I mean is that there is a fuction call that can set a break point.
I don't know, sorry.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
If you did I would probably be cluching my chest asking "how did he know that".
Well, not realy!
That is I think you took the wrong quote, becuase there are functions that can specifey break points.
INTP
Every thing is relative...
|
|
|
|
|
The old way to do it is by an:
INT 3
I don't know if it's still working. That was a safe way to break into the debugger, if present. (If outside a debugger, noting happened).
|
|
|
|
|
I seem to be missing a day.
I seem to rememeber that, but the original question was not how to break into the debugger, but how to prevent it from happening.
Which is probably a bad idea (in my opinion), in this case.
INTP
Every thing is relative...
|
|
|
|
|
John R. Shaw wrote: Question: Do you know if that stops the brake points built into the libararies. What I mean is that there is a fuction call that can set a break point. Example: I have no break points set and yet the debugger stops at some assembly code line (without source).
No it has no effect on complied in breakpoints at all.
You can compile in a breakpoint by using DebugBreak or AfxDebugBreak or a simple assembly statement.
John
|
|
|
|
|
That is precisely, the answer I would expect to recieve. I ask questions like this to illustrate the point that it is built into the developers code. If there is a way to disable it, I would be (slightly) supprised. I only say slightly, becaues very few things are a total supprises any more.
INTP
Oops! They made a 1 bit change in the protocal, so the precise (algorithmic) calculation (assumptions) you made five years ago is now off by one bit.
|
|
|
|
|
John R. Shaw wrote: What I mean is that there is a fuction call that can set a break point
AFAIK, Breakpoint are compiler specfic not program/software specfic. may be you have to look into the Visual Studio components to find about it
"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
|
|
|
|
|
I am kind of curious, of course breakpoints are specific to the compiler, in this case the compiler that comes with Visual Studio. That is what the statement you quoted is referring too!
What's your point?
INTP
Every thing is relative...
|
|
|
|
|
John R. Shaw wrote: Visual Studio. That is what the statement you quoted is referring too!
I Believe, you have to look for any exetention/automation provided visual studio to apply breakpoint programmatically!
"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
|
|
|
|
|
Ahh! I know how to set a breakpoint programmatically!
(See "John M. Drescher" and "kakan"s answers)
The original question was if breadpoints set programmatically could be turned off. The general consensuses is that they can not, and I would be suppised if they could.
INTP
Every thing is relative...
|
|
|
|
|
Press Ctrl+Shift+F9.
Removes all breakpoints.;)
Nibu thomas.
Software Developer.
|
|
|
|
|
|
Hi, I want to use lex/yacc in my project and I'm curious if Visual Studio can automate the following process. When I ask to build my project I have to call lex and yacc with their corresponding input files. These programs will generate some .c .h files that I want to be inserted into my project and then compile these files.
Is there any way I can script this process in VS in order to avoid doing it manually.
Thanks
-- modified at 18:25 Monday 7th November, 2005
|
|
|
|
|
a file named Wum.htm - please note, only first character of the file name is upcase (viewed in Windows file explorer).
when I use CFileFind or FindFirstFile to search the file, GetFileName() or GetFilePath() displays the file name as WUM.HTM - please note, all of characters of the file name are upcase.
as test:
1) if I copy it in Windows file explorer manually, the copy name is "Copy of WUM.HTM", the file name is still upcase.
2) if I change the file name to um.htm then back to Wum.htm - CFileFind gets same cases as viewd in Windows file explorer: Wum.htm.
I need case sensitive in CFileFind (related to UNIX issues) to search file names, could you explain why for above problem and how to solve it?
thx
you can find the file (Wum.htm) in your computer because it is a Windows file and test it if you like.
includeh10
|
|
|
|