I need to upload an image, for this i am using API's of CFFTP. But when I successfully login I am in path(/home/ftpadmim).
But I want to upload image on some other path, so I need to change directory and go to root directory and then move to specified directory.
But the problem is that I did not find any API of CFFTP that work same. I...
I'm working on one of my first projects that will span more than one C file. For my first couple practice programs, I just wrote my code in main.c and compiled using gcc main.c -o main. This worked for me as I was learning.
Now, I'm working on a much bigger project on my own. I want to continue doing compilation on my own (or at least s...
In Linux if we call blocking recv from one thread and close for the same socket from another thread, recv doesn't exit.
Why?
...
1>cb.c(51): error C2061: syntax error : identifier 'SaveConfiguration'
1>cb.c(51): error C2059: syntax error : ';'
1>cb.c(51): error C2059: syntax error : 'type'
1>cb.c(52): error C2061: syntax error : identifier 'LoadConfiguration'
1>cb.c(52): error C2059: syntax error : ';'
1>cb.c(52): error C2059: syntax error : 'type'
1>cb.c(122): er...
I have the following code which I'd hope would wait 2 seconds then wait 5 seconds in a loop.
There is a reason why I'm not using the it_interval to refire the timer.
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <semaphore.h>
sem_t se...
I have written a source code with a time delay.In unix I have used the
#include <unistd.h> header file and usleep function.
What is the equivalent to this on windows?
What library and function should I use if I write the same code on windows.
...
What is the difference between while loop and do while loop. I used to think both are completely same.Then I came across following piece of code :
do {
printf("Word length... ");
scanf("%d", &wdlen);
} while(wdlen<2);
This code works perfectly. It prints word length and tascans the input. But when I changed it to
...
Hi
I have following problem:
I have one global structure that has many structures inside.
Now I want one of the substructures taken out and stored in some other structure.
typedef struct
{
int a;
}A;
typedef struct
{
int b;
}B;
typedef struct
{
A dummy1;
B dummy2;
} C;
I want to declare fourth structure that extracts A fr...
I came across the following code - what is the data type of col_8888 and why does it reference the union _colours? I googled unions, but I can't find a reference to this kind of declaration - it looks to me as though col_8888 is a "union of unions"?
union _colours {
uint8 c[3][4];
uint32 alignment;
};
static const union _colou...
Hello ALL,
I am working on a project, where i need to get native stack of the Java Application. i am able to achieve this partially. thanks to ptrace/multiprocessing and signals.
on Linux normal java application has minimum 14 number of threads. out of these 14 i am interested in only main thread of which i have to get native stack. co...
Possible Duplicate:
C++ return x,y; What is the point?
Here's a piece of code that executes perfectly in C.
int a=3,b=4,x,y;
x=a+b;
y=a*b;
return(x,y);
This function returns 12. Can someone please explain.
...
Are there any open source C Library (not c++) for Windows Driver Development ?
I am developing a network device driver that need some functionality such as RegEx, string manipulation, Object Oriented by C and XML and so on...
thanks.
...
Dear all,
I've the following program:
#include <stdio.h>
int main()
{
int ch;
while( ch = getchar() != '\n') {
printf("Read %c\n",ch);
}
return 0;
}
No matter what I enter I get:
Read
Why is this happening and what is that weird char that I see?
Stackoverflow is not printing th...
How can I allocate memory for a struct pointer and assign value to it's member in a subfunction?
The following code will compile but not execute:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct _struct {char *str;};
void allocate_and_initialize(struct _struct *s)
{
s = calloc(sizeof(struct _struct), 1);
s->st...
Why do we at all use integers in C?
#include<stdio.h>
int main()
{
char c=10;
printf("%d",c);
return 0;
}
Is same as:
#include<stdio.h>
int main()
{
int c=10;
printf("%d",c);
return 0;
}
...
Hi,
Is there a way of determining if the regular expression only matches fixed-length strings ?
My idea would be to scan for *,+ and ? Then, some intelligent logic would be required to to look for {m,n} where m!=n.
It is not necessary to take the | operator into account.
Small example: ^\d{4} is fixed-length; ^\d{4,5} or ^\d+ are variab...
I am using Linux.
I am trying to write a program in c that will print a string backward.
Here is my code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main (){
char string[100];
printf ("Enter string:\n");
gets (string);
int length = strlen (string)-1;
for (length = length; length>=0; length--){
...
hiii , i just started studying makefiles and wrote the following one for a simple hello.c file. it shows some error saying :
makefile1:5: * missing separator. Stop.
What is the wrong here ... ?
CC=gcc
CFLAGS=-c -Wall
hello: hello.c
$(CC) $(CFLAGS) hello.c -o hello
clean:
rm -rf *.o
And , Is it always a ...
I have a small JNI program that uses shared memory to update NTP on a Linux server. The C portion of the code has three functions: attach the shared memory, set the time stored in the shared memory, and detach the shared memory. I would like to be able to run this program in Windows, while keeping the C code at least somewhat portable....
I'm looking for an R-Tree implementation, in C, Objective-c and even C++, which shall be efficient for searching the 2d rectangle in which a point falls ( memory efficiency would also be great, but I can sacrifice a bit more memory for time even while I am on an iPhone ). A good documentation will be appreciated too
...