LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices

Reply
 
Search this Thread
Old 11-16-2009, 05:29 PM   #1
erwfili
LQ Newbie
 
Registered: Oct 2009
Posts: 13

Rep: Reputation: 0
compilization error!!!!!


Hey!!!
i am facing a problem with the compilization of a programme, and i cant found the error!!...can i send u the code so as to help me pleasee???
thxs a lot !!
 
Old 11-16-2009, 05:45 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Well there is nothing we can do to help unless you post the output of the compiler, and the program you are trying to compile.

When posting the output of the compiler, use the "#" button on the top of the post editor. This will put the output in a CODE tag and make it easier to view.
 
Old 11-16-2009, 05:54 PM   #3
erwfili
LQ Newbie
 
Registered: Oct 2009
Posts: 13

Original Poster
Rep: Reputation: 0
ohh thxs a lot !! the code is

code

int main(int argc,char *argv[])
{
unsigned short offset_in_bits=0;
unsigned short next_offset_in_bits=0;
Bitstring *data;
Bitstring temp;
FILE *fp;
int n=8;
Bitstring *table;
int size=1;
int *counter=0;
int i;

printf("argv[0]=%s\n",argv[0]);
printf("argv[1]=%s\n",argv[1]);
printf("argv[2]=%s\n",argv[2]);

fp=fopen(argv[2],"r");
if(strcmp(argv[1],"-f")==1)&&(strcmp(argv[2],"file1.txt")!=0))
{
if(!(strcmp(argv[2],"file1.txt")))
printf("msg");
else
fp=fopen(argv[2],"r");
}

if(fp==NULL)
{
printf("Error! The file you have entred has not been found\n");
exit(-1);
}

//if(argc==1)



if(argc==1)
{
if(strcmp(argv[1]=="-f")==1)
{
}
else if((strcmp(argv[1]!="-f")==1)&&(strcmp(argv[1]!="-s")==1)&& (strcmp(argv[1]!="-h")==1))
{
printf("Error !");
exit(1);
}
}
do{
bitstring_init(&temp,offset_in_bits,n);
bitstring_read(&temp,fp,&next_offset_in_bits);
if((temp.size_in_bits)<n)
exit(1);
for(i=0;i<size;++i)
{
if(bitstring_equal(&temp,&table[i]))
{
counter[i]++;
break;
}
}
if(i==size)
{
size++;
table=(Bitstring *)malloc(sizeof(Bitstring));
counter=(int *)malloc(sizeof(int));
table[size-1]=temp;
}
}while(1);

fclose(fp);
return 0;
}




[/code]
 
Old 11-16-2009, 05:55 PM   #4
erwfili
LQ Newbie
 
Registered: Oct 2009
Posts: 13

Original Poster
Rep: Reputation: 0
ohhh thxs
the code is


[code]


int main(int argc,char *argv[])
{
unsigned short offset_in_bits=0;
unsigned short next_offset_in_bits=0;
Bitstring *data;
Bitstring temp;
FILE *fp;
int n=8;
Bitstring *table;
int size=1;
int *counter=0;
int i;

printf("argv[0]=%s\n",argv[0]);
printf("argv[1]=%s\n",argv[1]);
printf("argv[2]=%s\n",argv[2]);

fp=fopen(argv[2],"r");
if(strcmp(argv[1],"-f")==1)&&(strcmp(argv[2],"file1.txt")!=0))
{
if(!(strcmp(argv[2],"file1.txt")))
printf("msg");
else
fp=fopen(argv[2],"r");
}

if(fp==NULL)
{
printf("Error! The file you have entred has not been found\n");
exit(-1);
}

//if(argc==1)



if(argc==1)
{
if(strcmp(argv[1]=="-f")==1)
{
}
else if((strcmp(argv[1]!="-f")==1)&&(strcmp(argv[1]!="-s")==1)&& (strcmp(argv[1]!="-h")==1))
{
printf("Error !");
exit(1);
}
}
do{
bitstring_init(&temp,offset_in_bits,n);
bitstring_read(&temp,fp,&next_offset_in_bits);
if((temp.size_in_bits)<n)
exit(1);
for(i=0;i<size;++i)
{
if(bitstring_equal(&temp,&table[i]))
{
counter[i]++;
break;
}
}
if(i==size)
{
size++;
table=(Bitstring *)malloc(sizeof(Bitstring));
counter=(int *)malloc(sizeof(int));
table[size-1]=temp;
}
}while(1);

fclose(fp);
return 0;
}

[\code]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ubuntu login error accessibility app error exception during registry activatin from a jennyund Linux - Newbie 1 06-22-2009 09:35 PM
Sendmail: eocket wedge , 504 error , dsn error, mail relay connection error djcs Debian 0 03-03-2009 01:41 AM
PHP Error Parse error: parse error, unexpected $ in /home/content/S/k/i/SkinCare4U/h CowanServices Programming 2 12-09-2008 09:26 PM
Suse CUPS error: cups(File)DoRequest error:client-error-bad-request smdonelan Linux - Hardware 6 04-17-2007 07:46 PM
updating new installation of 9.3 ERROR...ERROR...ERROR Morbid Suse/Novell 3 08-16-2005 12:22 AM


All times are GMT -5. The time now is 11:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration