|
AnithaSubramani wrote: I need sample code.
Documentation [^] isn't enough?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
And this Simple Tutorial[^] too, which explains how to handle double click event for listbox.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hello everyone,
Since one of my .h file is included by multiple cpp files, and I want to track the compile process, so I want to have output during compiling phase each time when a cpp file which includes the .h file is compiled. And I also want to dump the compiled cpp file name.
For example, foo.cpp and goo.cpp includes common.h, when compiling foo.cpp, I want to output "foo.cpp is compiling" and when compiling goo.cpp, I want to output "goo.cpp is compiling".
I think I should use #pragma in common.h, but not an expert about this. Any ideas?
thanks in advance,
George
|
|
|
|
|
You can use like this,
#pragma message ("Compiling HelloWorld.cpp" )
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks Jijo,
Put it in .cpp files or in the .h file?
regards,
George
|
|
|
|
|
What is your guess?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks CPallini,
I think it means adding information to each cpp file. It is not a good solution since it means I need to modify all source files which need to include the header file.
Any better ideas or comments?
regards,
George
|
|
|
|
|
The guess is right: you should put it into the header file.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Put what information? Could you clarify please? There is some context missing here.
regards,
George
|
|
|
|
|
Well, I was wrong (I took literally the documentation [^]
__FILE__
The name of the current source file.
but a little test clearified my misunderstanding ).
Hence, I suppose __FILE__ is of little help. As workaround, you may compile the source file with the /E switch and look at the generated output.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks CPallini,
My confusion is put __FILE__ into header file will output the value of .h file other than .cpp file. This is not I want.
I want to know which cpp file (that includes the .h file) is compiling currect. Any comments or ideas?
regards,
George
|
|
|
|
|
Can be in .h as well as in .cpp. It depends your need.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks Jijo,
I am confused about the discussion context. You mean put what information in .h file which could monitor which cpp file (that includes the .h file) is compiling?
regards,
George
|
|
|
|
|
Possibly
#pragma message("Compiling " __FILE__ )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Indeed. Seems I need a coffee.
And 5 points to gryffindor.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
No, Jijo!
It will display the .h file name other than the .cpp file name if you put the statement into header file. Have you tried?
regards,
George
|
|
|
|
|
No, CPallini!
It will display the .h file name other than the .cpp file name if you put the statement into header file.
regards,
George
|
|
|
|
|
You're right, see my reply above [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
George_George wrote: ...when compiling foo.cpp, I want to output "foo.cpp is compiling" and when compiling goo.cpp, I want to output "goo.cpp is compiling".
Doesn't this information get displayed by the compiler by default?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks DavidCrow,
Yes. My question is, when a line like "foo.cpp is compiling" is displayed, does it mean the information above this line belongs to foo.cpp compiling process or the information after this line belongs to foo.cpp compiling process?
My compiler log output is long.
regards,
George
|
|
|
|
|
George_George wrote: Yes. My question is, when a line like "foo.cpp is compiling" is displayed, does it mean the information above this line belongs to foo.cpp compiling process or the information after this line belongs to foo.cpp compiling process?
Starting with the line below "foo.cpp is compiling" all the lines (until "goo.cpp is compiling" ) belongs to foo.cpp compilation process.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks for your advice, CPallini!
Smart guy!
regards,
George
|
|
|
|
|
Hi
I am working on Pocket PC 5.0 Win 32 C++ application and i want to load data (images) from web service. how i use the web service using win 32 C++. and how i create the HTTP request. please suggest.
Thanks
Khatri Mitesh
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
Learn about sockets and the HTTP protocol? There are tonns of docs around.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|