|
I can't be a griefer, I don't own a Oppressor 2 ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
i was up with the moon
braying in its general direction
at my wits end, or is it beginning?
it all runs together right now
morning will come when I'm not ready
Real programmers use butterflies
|
|
|
|
|
Braying? Are you calling yourself an ass?
|
|
|
|
|
at that hour? Yes!
Real programmers use butterflies
|
|
|
|
|
Being a new parent is tough.
|
|
|
|
|
|
I know, I feel that way too when I've left it too late to meet my looming deadlines...
|
|
|
|
|
Pub gets cheers, for new ideas. (10).
|
|
|
|
|
Too easy!
INN
...OVATION
(and I spelled right today!)
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Well done, you lead tomorrow.
I need more than 24 hours to create a difficult one.
|
|
|
|
|
Peter_in_2780 wrote: Too easy! Words I have never uttered when looking at these things.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Sometimes they just leap off the screen. PUB is often INN. New things starting with INN...
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Nice one!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Greetings and Kind Regards In the unlikely case the following is as much of a wonderment to anyone here as it is to me I present a simple little debugging/tracing/logging technique which effortlessly permits presenting the entry and all exits of any function i.e. a class which upon construction stores and displays the current function name so that upon destruction it can do likewise. - Cheerio
|
|
|
|
|
So present it!
Have you considered an article (if you go into enough details) or a tip (if it's just a quick document)?
They are pretty easy to do, and provide a permanent record that is easily found by others: Submit a new Article[^] - and you get rep points as well!
Before you do, look at some of the existing articles here to get an idea of the standard we expect.
Here's one of mine: Using struct and class - what's that all about?[^]
And here's a tip which is a lot more "code focussed": Creating a Simple "scratch card" Control in WinForms[^]
It will have to be moderated, but that's generally a painless process that doesn't take too long, unless it needs changes to fit the "house style" or improve the content. And all the moderators are article writers, so we know what it's like!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I took your suggestion and attempted to write a tip via the on-line editor but could not for the life of me figure out how to format a code block. I assumed I merely had to highlight the code text and press a button but could not find any "code" button and any other button I pressed affected the entire article text not just the text I have highlighted so until I learn to utilize the on-line editor I will not be posting the tip unless I post it here as the Lounge editor works as expected but I do not know if this is the correct venue for such. Kind Regards - Cheerio
|
|
|
|
|
It's pretty easy when you are used to it - this may help: Using the Article Editor (without losing your hair in handfuls)[^]. It has a section on code blocks.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Thank you for the article however its suggestion as to code block formatting is precisely what I have attempted and doing so results in the entire article being so formatted not only the highlighted portion. Kind Regards - Cheerio
|
|
|
|
|
|
Yes that is my article You may go at it as you please Thank You I would be happy to learn how to properly format if such instruction is not too much trouble Thank You again - Cheerio
|
|
|
|
|
I have gone in and fixed it.
Basically you want to hit the Source button in the top-right of the editor, and change this
struct cpreamble<br />
{<br />
std::string m_func;<br />
cpreamble(const char* func) : m_func(func) { std::cout << fg_yellow << func << fg_white << " entry" << std::endl; }<br />
~cpreamble() { std::cout << fg_cyan << m_func << fg_white << " exit" << std::endl; }<br />
};<br />
#define PREAMBLE cpreamble _cpreamble(__func__);<br />
So one can utilize it as below.<br />
void foobar()<br />
{<br />
PREAMBLE // first line in function<br />
// full body of function ...<br />
}<br />
To this:
<pre lang="C++">struct cpreamble
{
std::string m_func;
cpreamble(const char* func) : m_func(func) { std::cout << fg_yellow << func << fg_white << " entry" << std::endl; }
~cpreamble() { std::cout << fg_cyan << m_func << fg_white << " exit" << std::endl; }
};
#define PREAMBLE cpreamble _cpreamble(__func__);
So one can utilize it as below.
void foobar()
{
PREAMBLE // first line in function
// full body of function ...
}</pre>
Or, you want to leave that Source button alone, paste in your code exactly like this:
struct cpreamble
{
std::string m_func;
cpreamble(const char* func) : m_func(func) { std::cout << fg_yellow << func << fg_white << " entry" << std::endl; }
~cpreamble() { std::cout << fg_cyan << m_func << fg_white << " exit" << std::endl; }
};
#define PREAMBLE cpreamble _cpreamble(__func__);
So one can utilize it as below.
void foobar()
{
PREAMBLE // first line in function
// full body of function ...
}
Then select it all and go to the Formatted dropdown, and select "Formatted"
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
FIY: @PaltryProgrammer
Sean, can you let me know what he did, if possible - I'd like to update my guide to prevent it happening again?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I think he was trying to find a button to format the code, but the option was actually in a drop down menu.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Greetings and Kind Regards. Several times per day while working in Visual Studio (VS) the keyboard stops responding and the keyboard cursor is nowhere to be seen so I must reach for the mouse and click within the editor to bring the cursor back. This has been going on over many previous VS versions. It may be related to the speed of typing though am not completely certain. I find it difficult to believe it only occurs on my system and does not occur to the developers of VS as well and so always wonder why they do not repair it as it must be as much of a nuisance to them as to myself. May I please ask if this occurs to anyone of you? Also I am fascinated in wondering just how many developers work on VS. If any of you know I would appreciate being informed. Thank You Kindly. Finally I am glad I am not one of the VS developers as it seems amazingly complex. Incidentally I just discovered the nice feature whereby VS presents my own macro arguments when writing same. A nice touch. - Cheerio
PS The disappearing keyboard cursor only occurs in VS and no other editor I utilize.
|
|
|
|