Thanks for pointing this out.
Type: Posts; User: dariyoosh
Thanks for pointing this out.
I see now my mistake, thanks for the explanation.
According to man 3 scanf, I don't think that 4 is the right value but rather 5
And here is the output of the example I provided:
$ gcc -Wall testprog.c -o testprog
$ ./testprog...
Hi,
Based on the line 7, of your example
char s[20];
The max length is known.
Also I don't understand the use of atoi in your code. You find the length of the string by using strlen...
Hello,
Environement description:
OS: Linux Ubuntu x86_64
glibc: (Ubuntu EGLIBC 2.19-0ubuntu6.6)
Maybe I don't read it correctly, but what I see is that currently your llDelete function is empty.
As Adak said, you need a pointer as the function argument. A pass by value doesn't do the job.
An example:
#include <stdio.h>
void delContactByValue(int param_addressCounter)
{
And how much you have already done, so far, in terms of writing code for this problem?
Hello there,
If you use a void function, then you will need a pointer of pointer to your struct.
you can try the following:
#include <stdio.h>
@whiteflags
Many thanks for this clarification.
Regards,
Dariyoosh
That is very sad.
An address is the content/value of a pointer. Saying an address is/is not equivalent with a pointer has no meaning.
There are for sure double pointers. Each row is an...
I'm not sure whether I understood your point :)
An array, let's an int array, is a pointer to its first cell. Therefore it includes the address of its first cell, and that's why the sizeof...
In addition, what sizeof returns depends on the platform and also glibc installed on the system (processor X86 or x86_64). Here is what I get when I run the following on a Linux system (Fedora Core...
Hello there,
What I understand from your problem (well, actually you may need to modify a bit my solution for the value range part inside a loop) is that:
Assuming that numberOfRows is the...
I have never seen an assignment like this
tempStorage -> productName[50] = tempProductName[50]; //this part
Are you sure that you compile this without any error? (Linux or Windows?)
Hi,
Looking at your code, what I understand is that at the line n° 155 you test equality based on address of pointers and not their pointed values
if (displayItem -> categoryName ==...
And here is a second version as a void function which takes as parameter a pointer of pointer
/*
* Deletes the element at the given position.
*/
void deleteAtPosition(item_t **items, int...
Hello there,
You can try the following (assuming that list element indexes start at 0)
#include <stdio.h>
/*
What is exactly the error message you get when compiler halts upon the third function (therefore powerArgs I guess)?
Also doing casting to double while calling the pow function (in powerArgs)...
Then the lines 11 and 12 in your code should be moved inside the loop (assuming that you wish to read at most 25 times temperature from the kyboard, yet if I were you I would use a infinite loop...
There could be actually many possibilities, particularly as it was said, if you decide to implement your own key generator. As an example (among many other possibilities) you can use Java...
I think you may want to change the way you search for the specific number in your string value, at the lines 24, 25 in your code
if (array[i] == number)
number_count++;
allows to...
And based on what has been given to you, what have you implemented so far?
Regards,
Dariyoosh
Hi,
Your code would be something similar to this
#include <stdio.h>
int main()
{
Yes, thanks for the remark, here is the corrected version. Now that I look to the picture he provided, as I understand, only height = 0 is ignored but not height = 1. Also for each height H and line...