nah that doesnt solve it..... thanks mate anyway
Type: Posts; User: swagatob
nah that doesnt solve it..... thanks mate anyway
well how to solve the problem :) Why am I getting FILE OPEN ERROr? filenames I am testing on are very small.... "lao" "tzu" "dir"
back to sqaure 1.
char *a=argv[2];
char *b=argv[3];
char buf[20];
sprintf(buf, "%s/%s", a, b);
char buf2[20];
Could you be a little more specific? I am guessing you are stating that buf needs to have a \0 at the end like a string.....
how can i do that? Can you give me a small code of it?
thanks
...
char *buf;
if(instream2==NULL){
strcat( buf, a);
strcat( buf, "/" );
strcat( buf, b );
instream2=fopen(buf,"r");
}
I am using UNIX. Yes it is assumed that there is only one file inside the directory. And it is assumed that the file name inside the directory is the same as the filename of the other argument. WHat...
I need to open a file inside a directory. I am writting this utility that takes two inputs : from-file to-fileIf from-file is a directory and to-file is not, the utility compares the file in ...
you can open one file after another.... using fopen....
but you will possibly have to close the files after done
I think you can use .NET unless you are using UNIX. Then, you will possibly have to use some middleware technology... But I am not so sure. I am sure you can use .NET libraries to connect to excel to...
Line1: Foo bar baz
line2: foo bar baz
are not identical...
I am trying to compare two files and find the unique lines. The lines can be of different length, and the files can be of different length. I have to use Doubled Linked List. And I cant use unix...
/*structure of the double linked list*/
struct NODE2
{
struct NODE2 *pNext;
struct NODE2 *pPrev;
char* nData;
}*pHead, *pTail, *pNode, *pHead3,*pTail3,*pNode3;
char *newlinetest=malloc(100*sizeof(char));
strcpy(newlinetest,"\n");
this is my newline test
void adddll3(char *ch2)
{
pNode3 = malloc (sizeof (struct NODE2));
pelase help me... I am desperate.... thnks
Ok.very weird problem. Thanks to whoever can helpme here.
I have these double linked lists defined properly and working fine. I call them "pNode", and "pNode3".
The data inside pNode contains...
for 2 maybe use long rather than int... I am not sure though.....
while((num != 0) && (num !=1)){
printf("\n please print 0 or 1 :");
scanf("%d",&num);
}
as you can see that I am a newbee too :p
EDIT: while loop changed.. it possibly should be and...
try "gcc -Wall -ansi filename.c"
to display all warnings
EDIT: i.e if you are using UNIX
please use
.... :) thnks
your binary is my num
answ to 1 (i Think. I am a newbie too.. so :) )
int num;
scanf("%d", &num);
while((num != 0) || (num !=1)){
printf("\n please print 0 or 1 :");
scanf("%d",&num);
}
oh yeah... it should be double quotes ""
you know I am so tired.... that I am making more mistakes with time now.. damn
yeep fixed thanks all again. you guys are wonderful
char *newlinetest=malloc(100*sizeof(char));
strcpy(newlinetest,'\n');
hi
I used something llike this.. gives me SIGSEV, out of bound error
char *newlinetest=malloc(sizeof(4));
newlinetest='\n';
I want to copy '\n' (i.e a newline) into a
char *src
(i.e to a pointer to a character). The apparent use will be to chcek this string with other strings I have for newlines. I need to keep it...