|
Following discusses a new feature in C# which as it looks to me, just means code can be written in even more obscure ways to no point. It allows one to implicitly specify a constructor.
Refactor your C# code with primary constructors - .NET Blog[^]
I have been doing this a long in multiple OO languages and I can say for certain that I never, not even once, wished that I could write code that would mingle the constructor with a method call.
Seems like a perfect way for someone to decide to make modifications after the fact without refactoring but by trying to hack a way into using the same code.
|
|
|
|
|
How does one send a private message to another CodeProject member? My search skills must be weak in this area.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
Find a post they made and click the Email link (rather than the Reply link) on that post.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Thank you.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
Nowadays, you must have a really high CP reputation for the 'Email' link to appear. I remember it was there, generally available to everyone, but I guess someone abused it, so it was reserved for only those very trustworthy ones. I am not among those, and I wouold suspect that the OP isn't, either.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Nor am I (But Chris is probably right not to trust me on the site)
TTFN - Kent
|
|
|
|
|
Okay good, I thought I still wasn't seeing it.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
Is that a reputation limited thing? I don't see the email link on any posts.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Interesting. Such a link used to exist unless the OP turned that feature off (some members do this so as to not be bothered). I looked at several posts by myself and others and indeed I do not see an Email link. When I check my settings, however, I have the Email notifications turned on. I guess it's above my pay grade.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Can you explain how to enable/disable that feature? I don't find it, but I remember for sure, before a decade it was there.
Maybe also @kent-sharkey can help on that?
|
|
|
|
|
I'm fairly sure the private email link in posts was removed some time ago.
|
|
|
|
|
That used to be an option for everyone, but it's been a long time since I've seen the email link in any post. Just for giggles, check this response to see if the email link appears. In Options I have checked the "Allow private email replies to this message" box, as well as the "E-mail me if someone replies to this message" box.
Will Rogers never met me.
|
|
|
|
|
I just checked my permissions on CP. Apparently, in order to send private messages one must be a "protector". AFAIK, very few members have that privilege.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Just curious, or am I expecting too much ?
OK, I declare / define C function to return int...
Then I forget to add
return ...
in code.
Compiles / links AND crashes with no error message...
|
|
|
|
|
Wrong place to ask. When you find the correct place, include the actual code and other details.
|
|
|
|
|
|
Without an explicit return statement, functions default to returning an int . What compile level are you using? I always use level 4.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Me too and that was my first thought. How did that even compile?
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Might not wanna help him. This is the third time he's posted a programming question in the lounge. And from what I've seen the forums, he's not doing much better there either.
Jeremy Falcon
|
|
|
|
|
Even with all warnings disabled, the compiler should throw an error. ( visual studio and C++)
int Patate()
{
}
goto one of the programming forum and post minimal code that reproduce the problem.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Dude, this is like the third time. Clearly it's intentional now. You are expecting too much since this is the lounge.
Jeremy Falcon
|
|
|
|
|
Seems like something like this question was discussed not that long ago.
Salvatore Terress wrote: define C function to return int...
So C and not C++.
Per the following at least as far as the C11 spec this is allowed. I did not verify the spec myself.
https://stackoverflow.com/questions/10079089/implicit-int-return-value-of-c-function[^]
As several replies suggest the behavior is undefined however if the caller attempts to use the value. That of course would include crashing.
But there could be other reasons for it crashing.
|
|
|
|
|
Wordle 1,040 3/6
⬜⬜⬜🟨🟨
🟨⬜🟨🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,040 4/6
⬜🟨⬜⬜🟨
🟨🟨⬜🟨⬜
🟨⬜🟨🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,040 4/6
⬜⬜⬜🟨⬜
🟨🟨⬜🟨🟨
⬜🟨🟨🟩🟨
🟩🟩🟩🟩🟩
|
|
|
|