473,769 Members | 6,499 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

segmentation fault

can anyone tell me why the following piece of code causes a segmentation fault please ??
char *getFNFromIden( char *ident)
{
int i = 0 ;
printf("identif ier %s\n", allMenus[i].identifier) ;
while(allMenus[i].identifier[0] != '\0')
{
printf("Hello World") ;
i++ ;
}
}

As far as i can tell the seg fault is happening at while(bla) as the first printf is working, printing out what is in allmenus[i].identifier.
Thanks for any help
Matt
Nov 13 '05
15 7247
On Tue, 29 Jul 2003 14:14:37 +0100
Matthew Jakeman <ma************ @yahoo.co.uk> wrote:
<snip>
I might not have mentioned that the printf inside the loop never displays
anything, so it must exit the first time the while loop statement is
evaluated!!


Try adding a line terminator to the format string. "Hello World\n" or "Hello
World\r\n" should do the trick. While you're add it, find out how many loops
succeed, like this: printf ("loop count: %d\n", i);

And still we haven't seen any additional code.

--
main(int c,char*k,char*s ){c>0?main(0,"a dceoX$_k6][^hn","-7\
0#05&'40$.6'+). 3+1%30"),puts(" "):*s?c=!c?-*s:(putchar(45) ,c
),putchar(main( c,k+=*s-c*-1,s+1)):(s=0);r eturn!s?10:10+* k;}
Nov 13 '05 #11

"Al Bowers" <xa*@abowers.co mbase.com> wrote in message
news:bg******** ****@ID-169908.news.uni-berlin.de...


Matthew Jakeman wrote:
On Tue, 29 Jul 2003 11:58:16 GMT
"Nils Petter Vaskinn" <no@spam.for.me .invalid> wrote:

On Tue, 29 Jul 2003 13:31:40 +0100, Matthew Jakeman wrote:
On Tue, 29 Jul 2003 12:48:14 +0200
Pieter Droogendijk <gi*@binky.home unix.org> wrote:
>What's an allMenus? What if allMenus[0] doesn't exist? Is it's
>identifie r field defined? IS it even a string? We don't know that!

allMenus is a sstruct and identifier is a char *.

Argument isnt used as i want to fix this problem before i write the restof the function, there is no other code in, this is it.

Show us the calling code and the initialization of allMenus.

regards
NPV

Here's the struct :

struct menuDetail
{
char *identifier ;
char *name ;
char *ansfile ;
char *ascfile ;
char *keys[] ;
};
struct menuDetail allMenus[128] ;

Here's where it is initialised :

while(fLines[i] != NULL)
{
lToken = strtok(fLines[i], " ") ;
if(strcmp(lToke n, "MENU") == 0)
{
lToken = strtok(NULL, "\r\n") ;
allMenus[noMenus].identifier = lToken ;

This is not very useful in tracing the problem.

There is no visiable declaration of fLines or its values.

You have not provided the initial value of the variable
noMenus. If this variable is never 0, then the assignment to
allMenus[0].identifier will not occur in this loop. This
may be cause your function getFNFromIden fails because
you are referencing allMenus[0].identifier.

There are other serious defects in this snippit. You do not check
iToken to make sure it does not have the value of NULL before
you use it as an argument in strcmp. You did not check iToken
for NULL before you assigned iToken to allMenus[noMenus].identifier.

noMenus++ ;
//Need a better way to store the menu information or a way to map
//the menu number to the menu name
printf("noMenus : %i\nMenu Identifier : %s\n", noMenus , allMenus[noMenus].identifier) ;

If this is the actual code then the above should/may crash and burn - you
have already incremented noMenus so now allMenus[noMenus].identifier is NULL
i++ ;
The loop then goes on to do a load of other stuff that i think is irrelelevent..
And here's the code that i am having a problem with :

char *getFNFromIden( char *ident)
{
int i = 0 ;
printf("identif ier %s\n", allMenus[i].identifier) ;
while(allMenus[i].identifier[0] != '\0')
{
printf("going through the loop again") ;
i++ ;
}
}


--
Al Bowers
Tampa, Fl USA
mailto: xa*@abowers.com base.com (remove the x)
http://www.geocities.com/abowers822/

Nov 13 '05 #12
Here is the entire function that fille the allMenus struct, this should tell you what data is being put in :

void menuCfgParser()
{
FILE *menuFile ;
char *readIn ;
struct stat menuCfgStat ;
char *lToken = malloc(512) ;
int i = 0 ;
char *fLines[8192] ;
int noMenus = 0;
int noKeys = 0 ;
char *toArray ;
char *tempString = malloc(128) ;

menuFile = fopen(mainBbsIn fo.menufile, "r") ;
memset(&menuCfg Stat,0,sizeof (struct stat));
if((fstat(filen o(menuFile), &menuCfgStat )) == -1)
{
if(debug) perror("fstat() in menuCfgParser() returned -1") ;
}
readIn = malloc(menuCfgS tat.st_size);
fread(readIn, menuCfgStat.st_ size, 1, menuFile) ;
fclose(menuFile ) ;

lToken = strtok(readIn, "\r\n") ;
i = 0 ;
while(lToken != NULL)
{
toArray = trimLeadingWS(l Token) ;
if((toArray[0] != '#') && (strlen(toArray ) != 0))
{
fLines[i] = malloc(strlen(t oArray)) ;
fLines[i] = toArray ;
lToken = strtok(NULL, "\r\n") ;
i++ ;
}
else
{
lToken = strtok(NULL, "\r\n") ;
}
}
i = 0 ;
while(fLines[i] != NULL)
{
lToken = strtok(fLines[i], " ") ;
if(strcmp(lToke n, "MENU") == 0)
{
lToken = strtok(NULL, "\r\n") ;
allMenus[noMenus].identifier = lToken ;
noMenus++ ;
printf("noMenus : %i\nMenu Identifier : %s\n", noMenus , allMenus[noMenus].identifier) ;
i++ ;
if(strcmp(fLine s[i], "{") != 0)
{
printf("Error parsing menu config file after MENU %s\n", lToken) ;
exit(0) ;
}
else
{
i++ ;
}
while(strcmp(fL ines[i], "}") != 0)
{
lToken = strtok(fLines[i], " ") ;
if(strcasecmp(l Token, "MENU_NAME" ) == 0)
{
lToken = strtok(NULL, "\"") ;
allMenus[noMenus].name = lToken ;
if(debug) printf("Menu Name : %s\n", allMenus[noMenus].name) ;
}
else if(strcasecmp(l Token, "MENU_FILE_ANS" ) == 0)
{
lToken = strtok(NULL, "\r\n") ;
allMenus[noMenus].ansfile = lToken ;
if(debug) printf("Menu ANSI File : %s\n", allMenus[noMenus].ansfile) ;
}
else if(strcasecmp(l Token, "MENU_FILE_ASC" ) == 0)
{
lToken = strtok(NULL, "\r\n") ;
allMenus[noMenus].ascfile = lToken ;
if(debug) printf("Menu ASCII File : %s\n", allMenus[noMenus].ascfile) ;
}
else if(strcasecmp(l Token, "KEY") == 0)
{
lToken = strtok(NULL, " ") ;
strcpy(tempStri ng, lToken) ;
lToken = strtok(NULL, "\r\n") ;
strcat(tempStri ng, lToken) ;
allMenus[noMenus].keys[noKeys] = tempString ;
if(debug) printf("Menus key binding set : %s\n", allMenus[noMenus].keys[noKeys]) ;
noKeys++ ;
}
i++ ;
}
}
i++ ;
}
}

Here is the function that is failing at the while(blah)

char *getFNFromIden( char *ident)
{
int i = 0 ;
printf("identif ier %s\n", allMenus[i].identifier) ;
while(allMenus[i].identifier[0] != '\0')
{
printf("going through the loop again") ;
i++ ;
}
}

This function does not print out "going through the loop again" at all so the loop is obviously not being entered

and this is how the function is being called

getFNFromIden(m ainBbsInfo.init menu) ;

mainBbsInfo.ini tmenu is "main.ans" but this is pretty much irrelevant i think as it does not get used yet

Thanks again
Matt
Nov 13 '05 #13
On Tue, 29 Jul 2003 18:57:51 +0100
Matthew Jakeman <ma************ @yahoo.co.uk> wrote:
Here is the entire function that fille the allMenus struct, this should tell
you what data is being put in :

void menuCfgParser()
{
FILE *menuFile ;
char *readIn ;
struct stat menuCfgStat ;
char *lToken = malloc(512) ;
int i = 0 ;
char *fLines[8192] ;
int noMenus = 0;
int noKeys = 0 ;
char *toArray ;
char *tempString = malloc(128) ;

menuFile = fopen(mainBbsIn fo.menufile, "r") ;
memset(&menuCfg Stat,0,sizeof (struct stat));
if((fstat(filen o(menuFile), &menuCfgStat )) == -1)
{
if(debug) perror("fstat() in menuCfgParser() returned -1") ;
}
readIn = malloc(menuCfgS tat.st_size);
malloc could return NULL.
fread(readIn, menuCfgStat.st_ size, 1, menuFile) ;
fread may fail. And, you don't terminate the string. It was memset to 0, so
it's terminated in most cases, but what if you read exactly menuCfgStat.st_ size
bytes?
fclose(menuFile ) ;

lToken = strtok(readIn, "\r\n") ;
Wasn't IToken just malloc'd? where'd that memory go? It's lost forever.
i = 0 ;
while(lToken != NULL)
{
toArray = trimLeadingWS(l Token) ;
if((toArray[0] != '#') && (strlen(toArray ) != 0))
{
fLines[i] = malloc(strlen(t oArray)) ;
fLines[i] = toArray ;
No way, you did NOT just do that! First you make fLines[i] point to a
just-malloc'd memory, then you point it to 'toArray'. What you probably want, is
fLines[i] = malloc (strlen(toArray )+1);
fLines[i] = strcpy (fLines[i], toArray);
In your case, all elements of fLines point to whatever trimLeadingWS(I Token)
returned, instead of a copy of the string it points to, which is what you
really want.
lToken = strtok(NULL, "\r\n") ;
i++ ;
}
else
{
lToken = strtok(NULL, "\r\n") ;
}
}
i = 0 ;
while(fLines[i] != NULL)
you're screwed if you read exactly 8192 lines. What you could do instead, is
count how many lines you actually read, and use that instead. Learn how to use
for loops too.
{
lToken = strtok(fLines[i], " ") ;
if(strcmp(lToke n, "MENU") == 0)
IToken could be NULL
{
lToken = strtok(NULL, "\r\n") ;
Again
allMenus[noMenus].identifier = lToken ;
noMenus++ ;
printf("noMenus : %i\nMenu Identifier : %s\n", noMenus ,
allMenus[noMenus].identifier) ; i++ ;
IToken may have been NULL, so no guarantee this prints out anything you want
if(strcmp(fLine s[i], "{") != 0)
{
printf("Error parsing menu config file after MENU %s\n", lToken) ;
exit(0) ;
}
else
{
i++ ;
}
while(strcmp(fL ines[i], "}") != 0)
{
lToken = strtok(fLines[i], " ") ;
NULL?
if(strcasecmp(l Token, "MENU_NAME" ) == 0)
{
lToken = strtok(NULL, "\"") ;
NULL?
allMenus[noMenus].name = lToken ;
if(debug) printf("Menu Name : %s\n", allMenus[noMenus].name) ;
}
else if(strcasecmp(l Token, "MENU_FILE_ANS" ) == 0)
{
lToken = strtok(NULL, "\r\n") ; NULL? allMenus[noMenus].ansfile = lToken ;
if(debug) printf("Menu ANSI File : %s\n", allMenus[noMenus].ansfile) ;
}
else if(strcasecmp(l Token, "MENU_FILE_ASC" ) == 0)
{
lToken = strtok(NULL, "\r\n") ; NULL? allMenus[noMenus].ascfile = lToken ;
if(debug) printf("Menu ASCII File : %s\n", allMenus[noMenus].ascfile)
;
}
else if(strcasecmp(l Token, "KEY") == 0)
{
lToken = strtok(NULL, " ") ; NULL? strcpy(tempStri ng, lToken) ;
lToken = strtok(NULL, "\r\n") ; NULL? strcat(tempStri ng, lToken) ; What if it's too big? allMenus[noMenus].keys[noKeys] = tempString ;
All allMenus will be pointing at tempString. Malloc'd once. They'll all be the
same. There's more of these above.
if(debug) printf("Menus key binding set : %s\n",
allMenus[noMenus].keys[noKeys]) ; noKeys++ ;
}
i++ ;
What's this do again?
}
}
i++ ;
Use for loops, seriously. And try naming your counters in nested loops.
}
}

Here is the function that is failing at the while(blah)

char *getFNFromIden( char *ident)
{
int i = 0 ;
printf("identif ier %s\n", allMenus[i].identifier) ;
while(allMenus[i].identifier[0] != '\0')
{
printf("going through the loop again") ;
i++ ;
}
}

This function does not print out "going through the loop again" at all so the
loop is obviously not being entered
That's because it segfaults before anything is printed. That's because stdio
prints everything up 'till a newline, the rest sits in the buffer. try:
printf ("went through the loop %d times\n", i);
for some more favorable results. Windows may need you to print \r\n, but i'm not
sure.
and this is how the function is being called

getFNFromIden(m ainBbsInfo.init menu) ;

mainBbsInfo.ini tmenu is "main.ans" but this is pretty much irrelevant i think
as it does not get used yet

Thanks again
Matt


With everything going wrong in this code, it's no wonder you get a segfault. I
kinda got tired of it at the end there, so I probably missed a few things.
Go fix your code. Better yet, try rewriting it. Try using a better coding style
too.
For loops are good, as is a better naming convention.
Don't rely on the user's capacity to make flawless config files(if that is
indeed what this thing is reading).
Get your pointer galore straightened out.
strcpy() things.
free() is nice.
learn what malloc() does (part of pointer galore lessons)

I'm stopping now, but I could go on for a while.

--
main(int c,char*k,char*s ){c>0?main(0,"a dceoX$_k6][^hn","-7\
0#05&'40$.6'+). 3+1%30"),puts(" "):*s?c=!c?-*s:(putchar(45) ,c
),putchar(main( c,k+=*s-c*-1,s+1)):(s=0);r eturn!s?10:10+* k;}
Nov 13 '05 #14
"Pieter Droogendijk" <gi*@binky.home unix.org> wrote in message
news:2003072920 1848.7ba98daf.g i*@binky.homeun ix.org...
On Tue, 29 Jul 2003 18:57:51 +0100
Matthew Jakeman <ma************ @yahoo.co.uk> wrote:
Here is the entire function that fille the allMenus struct, this should tell you what data is being put in :

void menuCfgParser()
{
FILE *menuFile ;
char *readIn ;
struct stat menuCfgStat ;
char *lToken = malloc(512) ;
int i = 0 ;
char *fLines[8192] ;
int noMenus = 0;
int noKeys = 0 ;
char *toArray ;
char *tempString = malloc(128) ;

menuFile = fopen(mainBbsIn fo.menufile, "r") ;
memset(&menuCfg Stat,0,sizeof (struct stat));
if((fstat(filen o(menuFile), &menuCfgStat )) == -1)
{
if(debug) perror("fstat() in menuCfgParser() returned -1") ;
}
readIn = malloc(menuCfgS tat.st_size);
malloc could return NULL.
fread(readIn, menuCfgStat.st_ size, 1, menuFile) ;


fread may fail. And, you don't terminate the string. It was memset to 0,

so it's terminated in most cases, but what if you read exactly menuCfgStat.st_ size bytes?
fclose(menuFile ) ;

lToken = strtok(readIn, "\r\n") ;
Wasn't IToken just malloc'd? where'd that memory go? It's lost forever.
i = 0 ;
while(lToken != NULL)
{
toArray = trimLeadingWS(l Token) ;
if((toArray[0] != '#') && (strlen(toArray ) != 0))
{
fLines[i] = malloc(strlen(t oArray)) ;
fLines[i] = toArray ;


No way, you did NOT just do that! First you make fLines[i] point to a
just-malloc'd memory, then you point it to 'toArray'. What you probably

want, is fLines[i] = malloc (strlen(toArray )+1);
fLines[i] = strcpy (fLines[i], toArray);
In your case, all elements of fLines point to whatever trimLeadingWS(I Token) returned, instead of a copy of the string it points to, which is what you
really want.
lToken = strtok(NULL, "\r\n") ;
i++ ;
}
else
{
lToken = strtok(NULL, "\r\n") ;
}
}
i = 0 ;
while(fLines[i] != NULL)
you're screwed if you read exactly 8192 lines. What you could do instead,

is count how many lines you actually read, and use that instead. Learn how to use for loops too.
{
lToken = strtok(fLines[i], " ") ;
if(strcmp(lToke n, "MENU") == 0)
IToken could be NULL
{
lToken = strtok(NULL, "\r\n") ;


Again
allMenus[noMenus].identifier = lToken ;
noMenus++ ;
printf("noMenus : %i\nMenu Identifier : %s\n", noMenus ,
allMenus[noMenus].identifier) ; i++ ;


IToken may have been NULL, so no guarantee this prints out anything you

want
if(strcmp(fLine s[i], "{") != 0)
{
printf("Error parsing menu config file after MENU %s\n", lToken) ;
exit(0) ;
}
else
{
i++ ;
}
while(strcmp(fL ines[i], "}") != 0)
{
lToken = strtok(fLines[i], " ") ;
NULL?
if(strcasecmp(l Token, "MENU_NAME" ) == 0)
{
lToken = strtok(NULL, "\"") ;


NULL?
allMenus[noMenus].name = lToken ;
if(debug) printf("Menu Name : %s\n", allMenus[noMenus].name) ;
}
else if(strcasecmp(l Token, "MENU_FILE_ANS" ) == 0)
{
lToken = strtok(NULL, "\r\n") ;

NULL?
allMenus[noMenus].ansfile = lToken ;
if(debug) printf("Menu ANSI File : %s\n", allMenus[noMenus].ansfile) ;
}
else if(strcasecmp(l Token, "MENU_FILE_ASC" ) == 0)
{
lToken = strtok(NULL, "\r\n") ;

NULL?
allMenus[noMenus].ascfile = lToken ;
if(debug) printf("Menu ASCII File : %s\n", allMenus[noMenus].ascfile)
;
}
else if(strcasecmp(l Token, "KEY") == 0)
{
lToken = strtok(NULL, " ") ;

NULL?
strcpy(tempStri ng, lToken) ;
lToken = strtok(NULL, "\r\n") ;

NULL?
strcat(tempStri ng, lToken) ;

What if it's too big?
allMenus[noMenus].keys[noKeys] = tempString ;


All allMenus will be pointing at tempString. Malloc'd once. They'll all be

the same. There's more of these above.
if(debug) printf("Menus key binding set : %s\n",
allMenus[noMenus].keys[noKeys]) ; noKeys++ ;
}
i++ ;
What's this do again?
}
}
i++ ;


Use for loops, seriously. And try naming your counters in nested loops.
}
}

Here is the function that is failing at the while(blah)

char *getFNFromIden( char *ident)
{
int i = 0 ;
printf("identif ier %s\n", allMenus[i].identifier) ;
while(allMenus[i].identifier[0] != '\0')
{
printf("going through the loop again") ;
i++ ;
}
}

This function does not print out "going through the loop again" at all so the loop is obviously not being entered


That's because it segfaults before anything is printed. That's because

stdio prints everything up 'till a newline, the rest sits in the buffer. try:
printf ("went through the loop %d times\n", i);
for some more favorable results. Windows may need you to print \r\n, but i'm not sure.
and this is how the function is being called

getFNFromIden(m ainBbsInfo.init menu) ;

mainBbsInfo.ini tmenu is "main.ans" but this is pretty much irrelevant i think as it does not get used yet

Thanks again
Matt
With everything going wrong in this code, it's no wonder you get a

segfault. I kinda got tired of it at the end there, so I probably missed a few things.
Go fix your code. Better yet, try rewriting it. Try using a better coding style too.
For loops are good, as is a better naming convention.
Don't rely on the user's capacity to make flawless config files(if that is
indeed what this thing is reading).
Get your pointer galore straightened out.
strcpy() things.
free() is nice.
learn what malloc() does (part of pointer galore lessons)

I'm stopping now, but I could go on for a while.

--
main(int c,char*k,char*s ){c>0?main(0,"a dceoX$_k6][^hn","-7\
0#05&'40$.6'+). 3+1%30"),puts(" "):*s?c=!c?-*s:(putchar(45) ,c
),putchar(main( c,k+=*s-c*-1,s+1)):(s=0);r eturn!s?10:10+* k;}


As previously stated i am not doing the error checking until the main chunk
of code is finished, i know a user will not make a flawless config file
which is why i have written a program to do that for them.
If anyone else actually has an idea why i might be getting the seg fault i
would be grateful!
Matt
Nov 13 '05 #15
garagerules.fsn et.co.uk wrote:
"Pieter Droogendijk" <gi*@binky.home unix.org> wrote in message
[lots of helpful stuff]
As previously stated i am not doing the error checking until the main
chunk of code is finished, i know a user will not make a flawless config
file which is why i have written a program to do that for them.
If anyone else actually has an idea why i might be getting the seg fault i
would be grateful!


John Fraggin' Sheridan, garagerules, Pieter's post was stuffed with
places which could have lead to problems with your code. Why don't
youn *fix* them?

And not doing the error checking "until the main chunk of code is
finished" is much like "not doing the safety inspection until the
war is finished". That error checking will expose errors in your
code as well as errors in your data.

Build the thing incrementally and seek always to have a running,
tested, program.

--
Chris "if you ignore advice, advice will ignore you." Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgrou...mp.lang.c.html
C welcome: http://www.angelfire.com/ms3/bchambl...me_to_clc.html
Nov 13 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6809
by: sivignon | last post by:
Hi, I'm writing a php script which deals with 3 ORACLE databases. This script is launch by a script shell on an linux machine like this : /../php/bin/php ./MySript.php (PHP 4.3.3) My script works fine and do all what I need. But at the end of the execution, I can read "Segmentation Fault". The segmentation fault appear at the end of my script execution,
3
1939
by: diyanat | last post by:
i am writing a cgi script in C using the CGIC library, the script fails to run, i am using apache on linux error report from apache : internal server error Premature end of script headers: /var/www/cgi-bin/script.cgi when i debug the program i get Segmentation fault gdb ./script.cgi
16
8995
by: laberth | last post by:
I've got a segmentation fault on a calloc and I don'tunderstand why? Here is what I use : typedef struct noeud { int val; struct noeud *fgauche; struct noeud *fdroit; } *arbre; //for those who don't speak french arbre means tree.
3
11444
by: Zheng Da | last post by:
Program received signal SIGSEGV, Segmentation fault. 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 #1 0x40094c54 in malloc () from /lib/tls/libc.so.6 It's really strange; I just call malloc() like "tmp=malloc(size);" the system gives me Segmentation fault I want to write a code to do like a dynamic array, and the code is as
5
2998
by: Fra-it | last post by:
Hi everybody, I'm trying to make the following code running properly, but I can't get rid of the "SEGMENTATION FAULT" error message when executing. Reading some messages posted earlier, I understood that a segmentation fault can occur whenever I declare a pointer and I leave it un-initialized. So I thought the problem here is with the (const char *)s in the stuct flightData (please note that I get the same fault declaring as char * the...
18
26121
by: Digital Puer | last post by:
Hi, I'm coming over from Java to C++, so please bear with me. In C++, is there a way for me to use exceptions to catch segmentation faults (e.g. when I access a location off the end of an array)? Thanks.
27
3367
by: Paminu | last post by:
I have a wierd problem. In my main function I print "test" as the first thing. But if I run the call to node_alloc AFTER the printf call I get a segmentation fault and test is not printed! #include <stdlib.h> #include <stdio.h> typedef struct _node_t {
7
5879
by: pycraze | last post by:
I would like to ask a question. How do one handle the exception due to Segmentation fault due to Python ? Our bit operations and arithmetic manipulations are written in C and to some of our testcases we experiance Segmentation fault from the python libraries. If i know how to handle the exception for Segmentation fault , it will help me complete the run on any testcase , even if i experiance Seg Fault due to any one or many functions in...
3
5187
by: madunix | last post by:
My Server is suffering bad lag (High Utlization) I am running on that server Oracle10g with apache_1.3.35/ php-4.4.2 Web visitors retrieve data from the web by php calls through oci cobnnection from 10g release2 PHP is configured with the following parameters './configure' '--prefix=/opt/oracle/php' '--with-apxs=/opt/oracle/apache/bin/apxs' '--with-config-file-path=/opt/oracle/apache/conf' '--enable-safe-mode' '--enable-session'...
6
5043
by: DanielJohnson | last post by:
int main() { printf("\n Hello World"); main; return 0; } This program terminate just after one loop while the second program goes on infinitely untill segmentation fault (core dumped) on gcc. The only difference is that in first I only call "main" and in second call
0
9587
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.