am having coding below
QString configpath("/home/ishwarya/display_images");
i should not use this path directly in coding , i have to give in macros.
can any one please guide to me to do macros.:confused:
Thanks in Advance
Printable View
am having coding below
QString configpath("/home/ishwarya/display_images");
i should not use this path directly in coding , i have to give in macros.
can any one please guide to me to do macros.:confused:
Thanks in Advance
Looks like a school question on C++ programming (that has nothing at all to do with Qt). Perhaps you should consult your text books or a basic C or C++ tutorial?
I suspect what you're looking for is something like this in a header file:
Code:
#define CONFIG_PATH "/home/ishwarya/display_images"
and then in your cpp file:
This approach would allow you to reference the config path anywhere in your code and if you need to change it, you only need to change the define statement in the header file. That said, it really sounds like your config path should either be specified via user input or specified programattically rather than hard coded. There certainly is not a "/home/ishwarya/display_images" folder on anyone else's system.
Good luck.
This is not C++ kindergarden and your question has no relation to Qt.
I can only say the define statement you posted makes no sense syntax-wise.
... And you even quoted the text that shows exactly how it should be used in this thread