|
you forget he is writing to a file.... In context it should be this:
<br />
html_open("message in Visual C++ Forum");<br />
html_write("question");<br />
while (!answerfound)<br />
{<br />
Sleep(1);<br />
}<br />
if (tryPostingInLounge) throw(MassiveSarcasticResponse);<br />
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
So I really come across as MassivelySarcastic eh? Tsk*, Tsk*... I need to tone down I suppose. How though... Guess I need to quit working out and feeling so healthy. Maybe more 125 hour work weeks would tone me down...
Some assembly required.
Code-frog System Architects, Inc.
|
|
|
|
|
code-frog wrote: Maybe more 125 hour work weeks would tone me down.
Possibly tone you down to 6 feet under.... please don't try it....
I admit to a level of sarcasm too. we're even.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
FWIW, I think that MassivelySarcastic was a perfectly acceptable tone.
Why would you want to change it?
Two quotes come to mind:
"Gentle persuasion is fine, but nastiness gets better results."
"I'm not paid to make friends. If I made friends, I wouldn't be doing my job."
You keep right ahead with the MassivelySarcastic approach.
|
|
|
|
|
code-frog wrote: I need to tone down I suppose
Not at all. Squash them early, if miscreants persist in ignoring the rules of our society. The "No Programming Questions In The Lounge" statement is rather clear, and should be enforced. Good job, though it really shouldn't be necessary... Carry on - I'm off.
"...a photo album is like Life, but flat and stuck to pages." - Shog9
|
|
|
|
|
To be fair to him, I don't think we have a forum dedicated to C.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Well, I couldn't resist. Do we bust out a solution right here man? Should we? Do we cross that line and make ourselves rebels? I love a little rebellious nature now and then.
Some assembly required.
Code-frog System Architects, Inc.
|
|
|
|
|
code-frog wrote: Well, I couldn't resist
I'm kind of being sarcastic as well. I couldn't resist saying *something* when someone is probably using C style file handling in a C++ program, in the year 2005.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How about trying to use C99 (ISO/IEC 9899:1999) in a C++ program?!
Maxwell Chen
|
|
|
|
|
Whats wrong with the 'C' FILE aproch even in a C++ program. I did it once when i needed to write u pure ANSCI c++ program ???
codito ergo sum
|
|
|
|
|
BadKarma wrote: Whats wrong with the 'C' FILE aproch even in a C++ program.
Everything. It's very ugly.
BadKarma wrote: I did it once when i needed to write u pure ANSCI c++ program ???
I don't see the correlation. A pure ANSI C++ program would use C++ file handing.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: I don't see the correlation. A pure ANSI C++ program would use C++ file handing.
Which classes should i us;)e then?;)
codito ergo sum
|
|
|
|
|
ifstream/ofstream - iostreams are the c++ file handling class library.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am continually surprised by people who think they are C++ programmers because they write thier C code in files that end with .cpp or .cxx. They think a constant is made with #define, they've never even heard of Scott Meyers, etc., etc.
Matt Gerrans
|
|
|
|
|
Yep, the world is full of people who use C++, but have no idea of half the stuff it offers them.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
|
How can I convert a wchar_t into an integer.
iTest is the integer var.
wByteBuff is the wchar_t var.
I tried: swprintf(iTest,"%d",wByteBuff);
but i always get the error :error C2665: 'swprintf' : none of the 2 overloads can convert parameter 1 from type 'int'
i also tried with %x,%X,%i,%u,%c but none of this is working.
|
|
|
|
|
char to int is implicit. Is that not true for wchar ?
swprintf takes wide strings, I can't imagine why you're passing an int as the first parameter ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
try using the _wtoi function
|
|
|
|
|
thanks, but I searched this so much that I forgot what I wanted at first.
I wanted to convert the character contained in the wchar_t to it's decimal value.
|
|
|
|
|
|
Hi,
To start VC++ basics and concepts where shall i start? Do i need to know win32 appln first (by reading "programming windows" by charles petzold) before MFC???
I would like to learn VC++ in deeper. Could anyone suggest me how ?? and provide me some good books and tutorials???
|
|
|
|
|
The first step is to learn C++ itself, without any Windows stuff. IMO, you should then learn MFC, and finally learn Win32, to gain an understanding of what MFC is taking care of for you. This breaks down what you're learning so you can focus on one bit at a time. Learning Win32 then magically finding you don't need to know it anymore is just too much to bite off at once, IMO.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
After seeing a lot of the IM log managers out there I wanted to create a C++ program that via a command line prompt would copy IM log files into a a buffer or text file. While I get access the space in C:\Doc and Settings\GAIM\logs whatever, I cannot figure out how to open those files/ or write them into a buffer or text file. I am creating the program in Visual Studio for WIndows XP platforms.I know I must be missing a simple windows function call but any help would be greatly appreciated! Thanks
|
|
|
|