Perhaps put breakpoints in your coroutines.
Debugging anything with any kind of internal asynchronous behaviour (processes, threads, coroutines) can be challenging.
GDB has a lot of thread...
Type: Posts; User: Salem
Perhaps put breakpoints in your coroutines.
Debugging anything with any kind of internal asynchronous behaviour (processes, threads, coroutines) can be challenging.
GDB has a lot of thread...
Are you dedicating 3 to 5 hours of your day to just learning?
The first port of call for network programming would be this -> Beej's Guide to Network Programming
The next question would be,...
> Want to work as freelancer part time in "network programming",
So what's your day job?
Part time can be anywhere between 1 hour a month and 20 hours a week.
What's your commitment?
> 1-...
> if timr period is short and before function exit, another fire occurs, what would happen?.
Signals are not queued.
Generally speaking, you should not be doing a lot of work inside signal...
> As per your advice there is no difference between int and short they both serve the same purpose.
No.
These are the minimum capability required by the standard.
On any real machine,...
The standard requires that the minimum range of these types should be as follows.
— minimum value for an object of type short int
SHRT_MIN -32767 // −(215 − 1)
— maximum value for an object of...
ankitdixit is a shill for interviewbit
This is your last warning ankitdixit - one more post from you with your spammy site will be your last.
Did you even fix the problems pointed out?
The compiler writer looks at what the machine is capable of, then decides on appropriate sizes for things like integers, chars etc.
You as a user of that compiler are stuck with those choices.
First off, reading the standard won't teach you how to program.
Any more than reading a dictionary can help you learn a natural language.
For $0
The last draft for C99 is at Index of...
Bear in mind that the number of files you can have open at once is relatively small (compared say to the amount of memory you can allocate).
File Handling | Microsoft Docs
How to Use Ulimit...
It's the whacked font that makes 'o' and '0' look identical which isn't helping either.
Compile with warnings enabled.
$ gcc -Wall foo.c
foo.c: In function ‘main’:
foo.c:21:36: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘float *’ [-Wformat=]
...
So which compiler are you using?
> void main()
main returns an int.
> Xc = 1;
> Yc = 1;
Surprised the compiler will do this, given they're pointers.
> Xc = 0; //&a;
bytes per sample is like 2 usually.
> u_int32_t duration_in_second = 129;
> u_int32_t kilobytes_per_second = 192;
192 x 129 is never going to be 2.1MB
Your calculation is plain wrong.
channels * bytes per sample * samples...
> if (packetRead < 0)
This will get you out of the loop without doing anything.
Perhaps add some diagnostics to your code - rather than assume success and posting on a forum when it doesn't...
> Where is mistake, for small numbers alghortim seems to work fine.
Because the approach of "try all the possible ways" always results in "time limit exceeded" when presenting with larger numbers....
You need to at least show some attempt to solve the problem.
That way, we can really help with the problem you're really having.
Or we just assume you're just lazy and ignore you.
This isn't...
Here's what C99 says:
Does "other languages" include C++ ?
Whilst you can write GUI programs for windows in C, you have to write a LOT of code just to make anything remotely useful happen.
With C++ and a GUI...
The constness is lost by doing this
char *p_tag = strstr(pData,"ticks");
strtok() WRITES to the string.
If the string is read-only (which it is), then you get a segfault when you try to modify it.
You need to make a copy of the input string in a temporary buffer, then...
Lemme guess, you're trying to do strtok() in your parser on a const char* pData string.
Also this -> Short, Self Contained, Correct Example
If you want an accurate diagnosis, then post a runnable...
Your code makes no sense, and your image is broken.
> prtnVals->avg = 4454.0;
> prtnVals->Memory = pwmDiv;
Given your union, all you have is
prtnVals->Memory = pwmDiv;