You could lecture others on corporate-speak. Your curriculum could be titled "On how to talk a lot, but not say much at all. The art of meaningless content padding.". I can't help but think this...
Type: Posts; User: Xupicor
You could lecture others on corporate-speak. Your curriculum could be titled "On how to talk a lot, but not say much at all. The art of meaningless content padding.". I can't help but think this...
You guys just don't understand that akin to the greatest warrior, the greatest programmer is one that solves a problem without ever needing to write a single line of actual code.
The real mastery...
Well, yes, you're right, technically it's a tad more complicated than we usually tend to think about it. You're right, prototype != declaration and it matters in this case.
Also, interesting......
void foo() {
puts("OK!");
}
Since () means any number of arguments can be passed to foo - you can call foo in a number of ways, like so:
foo();
foo(42, 84);
foo("hello!");
foo(3.14);...
Yes, it's undefined behavior, I know. My point was not to show what will happen with destructors, but what might happen.
On my system for example delete on new[]ed array will fire just one...
I'm no guru, but there you go:
#include <iostream>
#include <memory>
#include <cstdlib>
class Data {
static int next_id;
int id;
public:
Or you can compile them in one go if you're just typing it in the terminal: g++ a.c b.c -o=result.exe
Also, don't forget to use include guards in your header files.
You can use custom function...
What's with the endl fetish? Why not just "stuff\n"? : )
hours_worked * hourly = total_hours;
regular_hours * hourly = total_hours;
(hours_worked - regular hours) * 1.5 * hourly = total_hours;...
As for fread(inbuf, ~0u, 1, stdin); - explain what you meant by this, exactly?
As for the second problem - I don't get your behavior on GCC 6.1.0 on Windows at all. Please verify that your array...
Is clang supported in Visual Studio already? If so - that would also be a good idea.
struct B;That's a declaration of B. It's also known as "forward declaration". At this point type B is incomplete, but you can use it to declare pointers to B or references to B (it's a tad more...
You promised the compiler that the function will return an unsigned int value, but in case the second branch is executed you let the execution to reach end of a function body without returning a...
Do you *need* to use recursive approach here? It's a really forced, bad example of recursion. (thus I assume it's an assignment)
About the code - take the howMany function definition out of main...
Yes, when you pass the address by copy you can use that address to access a value under it regardless of it (the address) being a copy.
Now, to take the sample test case I posted before - how do you...
All this boils down to the following example:
#include <stdio.h>
void foo(int i) {
i = 42;
}
int main() {
int data = 0;
foo(data);
Can you explain what parameters your eCript function takes?
#1 - naming the parameter "result" is kind of confusing. :P But to the meat of things - the copy might be optimized out, or it might not, it'd be even better if you passed the string by const...
algorism beat me to it. Yep, you just provide it an address of a proper pointer if you want the function to change it. Otherwise you just pass in NULL there and the function knows it's not a proper...
I don't have Code::Blocks at hand at the moment, but... Probably yes.Assuming it's the right place - yes. There should be some place to show you what options you have applied at the moment. (Then...
Also, what compiler are you using (remembering compiler != IDE)? (Sorry if you already mentioned it in another topic)
If it's GCC/MinGW (some older version is bundled with Code::Blocks, even older...
Look at the order of things:
- write to a file
- open file
- close file
Something's wonky here, don't you agree? Do you walk through doors first, and only open them later? (In case you actually...
It looks like you're missing dereference operator in your two last lines.
Like I said in that other topic - personally, I'd choose a book that covers at least C99, if not also C11. "C Primer Plus" latest edition by Prata covers C99 and C11. "C Programming A Modern...
If you have split the input cstring on space to get three "tokens" then that's half the battle.
Now look at your tokens. Three cstrings. How would you use a loop to get first letters in the first...
Dalai Lama supposedly said: “Be kind whenever possible. It is always possible.”
By the Elders of the Internet, I tried. I feel like I actively violate the above, but to avoid doing so even more - I...