Hi everyone,
My team is looking to expand and I'm seeking an experienced C++ developer. You can see more info here:
https://careers.bloomberg.com/hire/jobs/job40110.html
or PM me with any...
Type: Posts; User: QuantumPete
Hi everyone,
My team is looking to expand and I'm seeking an experienced C++ developer. You can see more info here:
https://careers.bloomberg.com/hire/jobs/job40110.html
or PM me with any...
What do you mean "reset". Your pointer has a different address stored? Can you post a small snippet of code that illustrates the problem?
Hi everyone,
I work for Bloomberg and my team is currently looking for a C++ developer to work with us in Central London. We deal mainly with financial software, though no finance experience is...
You can't compare floats/doubles directly. Like Salem already said they are inaccurate by definition. Instead do a comparison via an epsilon value. I.e. If the difference between the lhs and rhs is...
I'm going to do the whole Let Me Google That For You thing once more... and you'll find from the results that there are even two methods for doing it.
If you compile your code with debug symbols (the -g flag) you will get much better value from your debugger. It should be able to tell you exactly which line the segfault occurs and which variable it...
I think you should learn application programming before you dive into the kernel
I don't think you can afford my hourlies...
Seriously... spoon-feeding...
How would you go about ensuring that an action is carried out only once? Perhaps some state variable that can be checked via an if condition? When you encounter a "."...
What do you suggest the OP use instead?
There is no memory allocated for your target variable. You're basically using gets (which is bad by itself, you should use fgets) to write into a random part of memory. This is called undefined...
Code compiling without errors (and warnings hopefully) is no guarantee that it does what you want! It just means you don't have any compiler errors (or warnings)
Does this forum look like a ticketing system to you?
If the pointer is NULL, you're trying to access an invalid part of memory, hence the segmentation fault. You need to allocate memory first and assign its address to aux.lista before dereferencing.
It's because it's less-than-or-equal to i.e.
if (a <= 6)
We're heading down the slippery slope where you don't engage your brain and expect me to breadcrumb you to the answer...
There is no isfloat function that works on a char, because a char can't...
1. Don't use non-descriptive variable names like "k"
2. main should be declared as returning an int and thusly return something.
3. Variables should be declared on their own lines and always...
How about using Google?
It's amazingly useful, within seconds I found this!
This doesn't do what you want. It will always be true if sum2 is not 7 but greater than 0. Remember that there's a difference between assignment (=) and an equality check (==)
Because when the user enters a<return>, the return is left in the buffer (since you only asked for a char. Easiest way to fix this is to add a space between the quotation mark and percent sign in...
You've been taught to now...
To you maybe, but when it comes to generating machine code from C, the compiler is way smarter than you.
I found this very useful when I was studying.
The question is why would you even want to do that?
Like whiteflags said, you should follow the rules and best practices first. A couple to get you started:
1) Don't use conio.h it's non-standard
2) main should be declared with an int return
3)...