Thanks Quzah
That explains it a bit more for me, although I did leave out one valuable piece of information, I am actually using named pipes(FIFO's) so I don't think it gets opened the same way as...
Type: Posts; User: Ian
Thanks Quzah
That explains it a bit more for me, although I did leave out one valuable piece of information, I am actually using named pipes(FIFO's) so I don't think it gets opened the same way as...
I was curious as to what the difference is between a FILE * stream (which fclose closes) and an int fd (which close closes).
And also, is there a problem with opening a pipe using fopen, I am...
First off, I'm kind of curious as to what other people use... gtk+? xlib?
any suggestions? before I get too deep into one?
Secondly, I was first trying to make some sample code compile using...
I believe that code misses the first character of the string, to fix that you might do something like
for (i = strlen(s); i >= 0; --i)
you're also missing the newline character, but I assume...
pnumber is passed to the function change()
result = change(pnumber);
therefore the value that pnumber points to can be multiplied by 2 in change() because change() has a copy of the pointer.
...
I believe I used to get that error when I forgot to put a semicolon after the closing brace of a class.
class blah
{
};
Then again, maybe it was for some other reason....
(: Ian
I actually meant his faster computer, as it happened to be the one that would not finish loading the page, whereas the slower of the two computers did load it up properly.
Networking is awesome.
...
hehe, that's pretty odd, perhaps "they don't make 'em like they used to"?
j/k
thanks for explaining,
(: Ian
PHP is server-side is it not? So shouldn't PHP get run anywhere you connect to it from?
Tell me if I'm wrong...
Ian (:
Thanks for all the input guys, it makes a lot more sense to me now.
(: Ian
ok, here goes...
If I have fp = malloc(3*sizeof(int)); fp now points to the memory address of the first int of 3 that have been allocated for my use. When I use free(fp); it frees those 3 ints.
...
Thanks much Salem, I included stdlib.h and removed the cast and it worked great...
You're up a bit early eh?
Thanks again (:
Ian
Nevermind I got a fix (: thanks anyhow
it was:
intp = (int*)malloc(3*sizeof(int));
still a bit curious though, do you guys usually cast it as whatever type of pointer it is? or do you do it...
I haven't done much with memory allocation, and I'm getting a warning from gcc when I try and compile it, it says "warning: assignment makes pointer from integer without a cast"
/*These are the...
You should be able to close the file from your main() function or your other function, I don't think it really matters WHERE you close it, as long as you make sure it gets closed...
(:
I couldn't get the picture either, tripod says they're hosting it and it's not available for download
uhh.. cnt should start at 0 not 1
because you're skipping the first question when it starts at 1
anyway, a minor note (:
Ian
uh... there's a frowny face in your code man ):
If you add the '&' as Troll suggests that gets rid of the segmentation fault.
Example: scanf("%d",&q);
I don't really know how to explain what your function is doing. It is calling itself...
/*START CODE BLOCK*/
#include <stdio.h>
#include <unistd.h>
int main()
{
printf("Starting delay.\n");
sleep(5);
printf("Ending delay.\n");
/*BEGIN CODE BLOCK*/
#include <stdio.h>
int main()
{
char buffer[80];
int coordinates[6];
int i;
for (i=0; i<6; i++)