|
Although I am not initiated in programming, I felt it when I started to learn C++ and MFC despite C#, that C++ is more closer to the hardware components, to the heart of the machine, I felt that with C++ I can put my hands and get dirty, and so on that with WINAPI I can comunicate more closer with WINDOWS system, through the windows API functions, I felt that those are the right and honest stpes to get started in programming, I felt that these are the basics that I have to know to start an healty way of programming. But my goal is as you expressed yourself " to make myself an income" and for that appears that I have to learn more tools to be able to deliver a stand alone product. I don't know if my path is the good one but I keep pushing until I will succed.
Thank you.
|
|
|
|
|
I have and this error to, that I don't know how to solve it:
Quote: error C3861: 'GetWindowInstance': identifier not found
I don't know at where to take this function.
If you cand help me and with this to.
Thank you,
|
|
|
|
|
It appears that I have to include WindowsX.h to solve that.
Thank you,
|
|
|
|
|
Why would you use a macro for something that you only need once? Or even if you need it more than once you should make it a callable function.
|
|
|
|
|
I am trying to compile some code from a book to understand what the author wants to transmit. Maybe the book it is a bit old and that's why some tehniques are inappropiate.
|
|
|
|
|
The problem with using that sort of macro is that they are a pain to debug when something goes wrong. All you need to do is copy and paste the actual lines of code into your OnInitDialog function. And remember to remove all those backslashes. You can then easily step through line by line in the debugger if necessary.
|
|
|
|
|
Yes, I had wondered myself if it is any method to see where is the error in this macro functions because compiler says generally that is an error in a macro function but you have to search through all lines of the code to see where the error could be.
And those backslash are very wierd, I don't know what is their role.
|
|
|
|
|
The backslashes are there to tell the macro processor to include them all until it finds a line that just ends in a newline.
#define FOO(x) \ // means the definition continues onto the next line
x *= 25; \ printf("X = %d\n");
|
|
|
|
|
I would like to go over some old code and replace the use of CString (MFC / ATL) with a multiplatform, C++ 20 equivalent. Can I use std::format and if so, then how?
|
|
|
|
|
std::format is not directly compatible with sprintf formatting codes. From what I've seen there are different ways to go about this:
- do sprintf to a temporary buffer and assign buffer to a std::string
- switch to string streams (std::stringstream) and their "<<" operator
- switch to std::format and their "{}" style formatting.
None is automatic and about equally unpleasant.
Mircea
|
|
|
|
|
Message Closed
modified 15-May-23 19:06pm.
|
|
|
|
|
Yes, the option to remove blank lines doesn't usually exist.
|
|
|
|
|
|
I all I did was answer your question. What the did i do wrong?
Quote: I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code?
|
|
|
|
|
14968771 often answers like that. Similarly gives instructions in his questions as to how you must answer.
|
|
|
|
|
Wow.
The quality of the question directly dictates the quality of the answer.
|
|
|
|
|
IIRC a few years ago he actually complained about this in Bugs 'n' Sugs.
|
|
|
|
|
|
Yeah, "working as expected".
|
|
|
|
|
First:Member 14968771 wrote: I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code? being answered withYes, the option to remove blank lines doesn't usually exist. is a direct, clear answer to your question, and certainly doesn't justify your reaction:Answering questions is also a skill , especially without unasked / uncalled for preaching and other innuendos and insults. I have no idea why you show this kind of reaction to a simple (and correct) answer to exactly what your were asking for.
Then: To remove blank lines in Notepad++, I first delete all trailing spaces at end of lines (NP++ has a command for that). Then I replace two consecutive newlines with one newline. NP++ can handle both ISO standard, Mac and *nix newlines, and you have to specify the correct format for the search to match, and you have to select 'Search mode: Extended'.
I guess that any editor that can match on newlines of various kinds can be used in a similar way to remove blank lines.
|
|
|
|
|
My guess is that Member 14968771 does not realise that what's below the horizontal line is simply Dave's signature. He's reading it as a personalised response to his question, misconstruing it entirely and taking it as a personal dig.
|
|
|
|
|
He gives offence freely, and takes it at the drop of a hat.
|
|
|
|
|
Message Closed
modified 15-May-23 19:06pm.
|
|
|
|
|
I am assuming that your QP pointer is a reference to an object of QProcess Class | Qt Core 6.3.2[^]. As stated in the documentation the start method assumes the device mode as ReadWrite , which if it follows the normal rules, suggests you can write to and read from the started process. But writing will only work if the started process is waiting for input on its stdin stream. As far as I can see your started process is a simple shell pipeline to write some data to stdout and a couple of files. So it is not likely to be waiting for input from an external source.
|
|
|
|
|
Message Closed
modified 15-May-23 19:06pm.
|
|
|
|