|
Just additionally to what others told you:
I assume i at the beginning is zero.
So if it comes to the first "part" (right to left), ++i will make it 1, then there's the second part which is simply i so it remaints 1 and then it comes to the third part, ++i again which will increase i to 2, thus 2,1,1.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
correct, but what about the other statement
printf("%d %d %d",++i,i++,++i);
whcih also gives the same result
using VC++6
-----------------------------
I am a beginner
|
|
|
|
|
Is i equal to 3 after printf ? If so, then i'd say, i++ is executed after printf finished.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hi,
What is the function used when USB Storage Device removed? When we click on safely remove hardware it remove the USB Storage Device .I want to know that function .Actually i want to do is whenerver i remove USB Storage Device from WindowsXP it will show a message box as "your Device is safely removed" like Windows Vista.i know that how to write a code for the message box but i don't know the code which is used when USB Storage Device is removed.
I simply want to say that how to code a program for USB Storage Device, which can show a messagebox when USB Storage Device is removed?
|
|
|
|
|
|
Thanks for the shout out for that article. I wrote it after seeing one too many of these questions.
You've made my day by using for the intended purpose. "I don't have to give you an answer - go look at this!".
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: "I don't have to give you an answer - go look at this!".
|
|
|
|
|
|
|
1/ The article wasn't copied from that page!
My article was written 20th June 2007... The MSDN article says it was written on 30th July 2009.
2/ I found the information a little hard to gather initially...
3/ The original question you're in the thread of (how tangled is that!? ) answers your question of "why write this article". There were several related questions not long before I wrote it, and I could not see an appropriate resource on CP.
4/ I think my code is a little better wrapped up in a program than MSDN's.
5/ Maybe my other articles are more to your liking. I look forward to reading your more useful ones.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
I want to write data in xls file programaticaaly how ??
Trioum
|
|
|
|
|
I never used this[^] before but...can it be any help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Using C++? #import the Excel type library (as shown here[^]), then use the Excel object model to do whatever you want.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
Is there any way to store the output of CreateProcess("C:\\Windows\\System32\\cmd.exe", command, NULL, NULL, 0, 0, NULL, NULL, &si, &pi); .so that it can be stored in an array.Basically i want to say that if in command i put /K dir then it will show all the directories but i want to store that name of directories or whatever which is output in an array. Is it possible?
|
|
|
|
|
ravi 12 wrote: .Basically i want to say that if in command i put /K dir then it will show all the directories but i want to store that name of directories or whatever which is output in an array.
You can actually get the list of files/folders in a folder using the FindFirstFile(), FindNextFile() functions. The method of using "dir" command to get the list of file doesn't seems good.
|
|
|
|
|
hey naveen,actually i want to see all the directories of all drives.can FindFirstFile() and FindNextFile() functions are able to show me the directories? can you please write down the source code?
|
|
|
|
|
ravi 12 wrote: hey naveen,actually i want to see all the directories of all drives.can FindFirstFile() and FindNextFile() functions are able to show me the directories
yes
ravi 12 wrote: can you please write down the source code?
Sorry. But there are lots of sample. Search google and code project for samples
|
|
|
|
|
ravi 12 wrote: i want to store that name of directories or whatever which is output in an array
So that's what all these threads about launching a new console with CreateProcess, running "dir", and redirecting the output were about?
I believe David Crow was the one with the best mind reading abilities right from the beginning when he suggested (twice) FindFirstFile()/FindNextFile() but you simply ignored that.
Since you're ignoring all suggestions - we can't help you.
|
|
|
|
|
hay Michael Schubert, actually at that time i didn't know anything about FindFirstFile() and FindNextFile() function() .so i was ignoring all those suggestions.
|
|
|
|
|
ravi 12 wrote: so i was ignoring all those suggestions.
Please note: people here make suggestions to try and help you, not for fun. Don't just ignore them and keep repeating your question, but give them a try. Read the documentation on MSDN, use Google to search for help, try the tutorials here on Code Project. Above all try and learn for yourself how to use the many tools that are available to solve your problems.
|
|
|
|
|
Hey Richard MacCutchan, sorry if my words "So i was ignoring all those suggestions" hurt you.Actually at that time i didn't know anything about the function FindFirstFile().I'm sorry for that.Don't mind these words.
|
|
|
|
|
ravi 12 wrote: sorry if my words "So i was ignoring all those suggestions" hurt you.
Ravi, don't worry, your words had no effect on me. I was merely trying to get you to see that when people here make a suggestion, then you should investigate it. It is made to help you get your job done.
|
|
|
|
|
Hi,
I have a Utility, written many years ago. It's main interface consists of a Dialog box with some Text, and Bitmap features. It worked without fault from Win98 upto XP. However, under VISTA, the Bitmaps display at about 2/3 of their design size.Anybody Any Idea why ?
Regards,
Bram van Kampen
|
|
|
|
|
Is the image placed on a static control using the SS_CENTERIMAGE style? The style used to fill uncovered areas of the control with the colour of the top left pixel in the image (a very nice feature btw) but that got changed in windows vista. The docs[^] say it got changed in XP but my apps still run the old behavior in XP but not in vista.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks,
No, this styleflag was not set.
It appears in general that my underlying code works under Vista, but, the carefully crafted Dialog Layouts break down. For starters, Bitmaps display at 2/3rd of their size. Listbox Geometry seems to reduce by a similar factor, the List goes On. What has changed that worked perfectly since Win95. Why was there a need to change.
Regards,
Bram van Kampen
|
|
|
|