473,503 Members | 6,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replace word in text file

Hello, I need to write a program that opens a text file and scans the entire
file for a specific line and when that line is found, a particular word on
that line is to be replaced. The new word is given as an argument to the
program. I wrote a small test program that doesn't work because strcmp()
fails to find a matching line. Here's the code:

#include <stdio.h>
#include <string.h>

int main(int argc, char** argv)
{
FILE* in_file = NULL;
FILE* out_file = NULL;
char* temporary_file_name = NULL;
char line[128];

if(argc < 2)
{
fprintf(stderr, "You must supply a word.\n");

return 1;
}

in_file = fopen("test.txt", "r");

if(in_file == NULL)
{
fprintf(stderr, "Error opening test.txt\n");

return 1;
}

temporary_file_name = tmpnam(NULL);

out_file = fopen(temporary_file_name, "w");

while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line);

if(strcmp(line, "set imap_user=root") == 0)
{
printf("Replacing.\n");
strcpy(line, "set imap_user=");
strcat(line, argv[1]);
}

fputs(line, out_file);
}

fclose(in_file);
fflush(out_file);
fclose(out_file);

remove("test.txt");
rename(temporary_file_name, "test.txt");

return 0;
}

And here's the original file test.txt:
set spoolfile=imap://sysinst.ida.liu.se/INBOX
set folder=imap://sysinst.ida.liu.se/INBOX
set imap_user=root
set ssl_starttls=no
set sendmail="/usr/sbin/sendmail -oem -oi"

Why doesn't it work?

/ William Payne
Nov 13 '05 #1
18 21694
William Payne wrote:
Hello, I need to write a program that opens a text file and scans the
entire file for a specific line and when that line is found, a particular
word on that line is to be replaced. The new word is given as an argument
to the program. I wrote a small test program that doesn't work because
strcmp() fails to find a matching line.
That's because fgets doesn't strip the newline (assuming it finds one in the
available space).
while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line);

if(strcmp(line, "set imap_user=root") == 0)


I suggest you replace this line with:

if(strcmp(line, "set imap_user=root\n") == 0)

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #2


On 11/5/2003 2:58 PM, William Payne wrote:
Hello, I need to write a program that opens a text file and scans the entire
file for a specific line and when that line is found, a particular word on
that line is to be replaced. The new word is given as an argument to the
program. I wrote a small test program that doesn't work because strcmp()
fails to find a matching line. Here's the code:
<snip> while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line);

if(strcmp(line, "set imap_user=root") == 0)


fgets() copies the newline char to the end of the string, so "line" ends in a
newline whereas "set imap_user=root" doesn't.

Ed.

Nov 13 '05 #3

"William Payne" <mi**************@student.liu.se> wrote in message
news:bo**********@news.island.liu.se...
Hello, I need to write a program that opens a text file and scans the entire file for a specific line and when that line is found, a particular word on
that line is to be replaced. The new word is given as an argument to the
program. I wrote a small test program that doesn't work because strcmp()
fails to find a matching line. Here's the code:

#include <stdio.h>
#include <string.h>

int main(int argc, char** argv)
{
FILE* in_file = NULL;
FILE* out_file = NULL;
char* temporary_file_name = NULL;
char line[128];

if(argc < 2)
{
fprintf(stderr, "You must supply a word.\n");

return 1;
}

in_file = fopen("test.txt", "r");

if(in_file == NULL)
{
fprintf(stderr, "Error opening test.txt\n");

return 1;
}

temporary_file_name = tmpnam(NULL);

out_file = fopen(temporary_file_name, "w");

while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line);

if(strcmp(line, "set imap_user=root") == 0)
Change the above line to:

if(strcmp(line, "set imap_user=root\n") == 0)
{
printf("Replacing.\n");
strcpy(line, "set imap_user=");
strcat(line, argv[1]);
strcat(line, "\n");

/* you should also provide protection against 'strcat()'
overflowing the array 'line' */
}

fputs(line, out_file);
}

fclose(in_file);
fflush(out_file);
fclose(out_file);

remove("test.txt");
rename(temporary_file_name, "test.txt");

return 0;
}

And here's the original file test.txt:
set spoolfile=imap://sysinst.ida.liu.se/INBOX
set folder=imap://sysinst.ida.liu.se/INBOX
set imap_user=root
set ssl_starttls=no
set sendmail="/usr/sbin/sendmail -oem -oi"

Why doesn't it work?


'fgets()' stores the newline (if any) that it reads.

My above changes aren't foolproof, i.e. if the line read
has 'trailing spaces' before the newline, or if 'fgets()'
doesn't read a newline, then it won't work.

-Mike
Nov 13 '05 #4

"Richard Heathfield" <do******@address.co.uk.invalid> wrote in message
news:bo**********@titan.btinternet.com...
William Payne wrote:
Hello, I need to write a program that opens a text file and scans the
entire file for a specific line and when that line is found, a particular word on that line is to be replaced. The new word is given as an argument to the program. I wrote a small test program that doesn't work because
strcmp() fails to find a matching line.
That's because fgets doesn't strip the newline (assuming it finds one in

the available space).
while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line);

if(strcmp(line, "set imap_user=root") == 0)


I suggest you replace this line with:

if(strcmp(line, "set imap_user=root\n") == 0)

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton


Thanks for the quick reply, Mr Heathfield. It appears that you are right
about fgets() not stripping the newline because I got an empty line between
the printf()-statements in the while()-loop. So I wrote strcmp() as you
suggested, but it still fails to match the string. =( Any ideas?

/ William Payne
Nov 13 '05 #5

"Mike Wahler" <mk******@mkwahler.net> wrote in message
news:SI****************@newsread4.news.pas.earthli nk.net...

"William Payne" <mi**************@student.liu.se> wrote in message
news:bo**********@news.island.liu.se...
Hello, I need to write a program that opens a text file and scans the

entire
file for a specific line and when that line is found, a particular word on that line is to be replaced. The new word is given as an argument to the
program. I wrote a small test program that doesn't work because strcmp()
fails to find a matching line. Here's the code:

#include <stdio.h>
#include <string.h>

int main(int argc, char** argv)
{
FILE* in_file = NULL;
FILE* out_file = NULL;
char* temporary_file_name = NULL;
char line[128];

if(argc < 2)
{
fprintf(stderr, "You must supply a word.\n");

return 1;
}

in_file = fopen("test.txt", "r");

if(in_file == NULL)
{
fprintf(stderr, "Error opening test.txt\n");

return 1;
}

temporary_file_name = tmpnam(NULL);

out_file = fopen(temporary_file_name, "w");

while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line);

if(strcmp(line, "set imap_user=root") == 0)


Change the above line to:

if(strcmp(line, "set imap_user=root\n") == 0)
{
printf("Replacing.\n");
strcpy(line, "set imap_user=");
strcat(line, argv[1]);


strcat(line, "\n");

/* you should also provide protection against 'strcat()'
overflowing the array 'line' */
}

fputs(line, out_file);
}

fclose(in_file);
fflush(out_file);
fclose(out_file);

remove("test.txt");
rename(temporary_file_name, "test.txt");

return 0;
}

And here's the original file test.txt:
set spoolfile=imap://sysinst.ida.liu.se/INBOX
set folder=imap://sysinst.ida.liu.se/INBOX
set imap_user=root
set ssl_starttls=no
set sendmail="/usr/sbin/sendmail -oem -oi"

Why doesn't it work?


'fgets()' stores the newline (if any) that it reads.

My above changes aren't foolproof, i.e. if the line read
has 'trailing spaces' before the newline, or if 'fgets()'
doesn't read a newline, then it won't work.

-Mike


Thanks for your reply, Mr Wahler. I tried this loop as you and others
suggested:

while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s", line);

if(strcmp(line, "set imap_user=root\n") == 0)
{
printf("Replacing.\n");
strcpy(line, "set imap_user=");
strcat(line, argv[1]);
strcat(line, "\n");
}

fputs(line, out_file);
}

But strcmp() never returns 0 so no replacement is made. So then I tried
replacing the call to strcmp() with the following:
if(strstr(line, "set imap_user=root") != NULL)

and now it founds a match one the correct line and correctly replaces the
word. Very good, but it annoys me that I don't know why strcmp() doesn't
work.

/ William Payne
Nov 13 '05 #6


On 11/5/2003 3:14 PM, William Payne wrote:
"Richard Heathfield" <do******@address.co.uk.invalid> wrote in message
news:bo**********@titan.btinternet.com... <snip>
I suggest you replace this line with:

if(strcmp(line, "set imap_user=root\n") == 0)

<snip> Thanks for the quick reply, Mr Heathfield. It appears that you are right
about fgets() not stripping the newline because I got an empty line between
the printf()-statements in the while()-loop. So I wrote strcmp() as you
suggested, but it still fails to match the string. =( Any ideas?
Not all OSs just use "\n" as the line terminator. Try adding "\n\r" instead of
just "\n". This approach still fails if "fgets()" doesn't read to the end of
the line...

Ed.
/ William Payne


Nov 13 '05 #7
Ed Morton <mo****************@lucent.com> wrote:

On 11/5/2003 3:14 PM, William Payne wrote:
"Richard Heathfield" <do******@address.co.uk.invalid> wrote in message
news:bo**********@titan.btinternet.com... <snip>
I suggest you replace this line with:

if(strcmp(line, "set imap_user=root\n") == 0)

<snip>
Thanks for the quick reply, Mr Heathfield. It appears that you are right
about fgets() not stripping the newline because I got an empty line between
the printf()-statements in the while()-loop. So I wrote strcmp() as you
suggested, but it still fails to match the string. =( Any ideas?

Not all OSs just use "\n" as the line terminator. Try adding "\n\r" instead of
just "\n". This approach still fails if "fgets()" doesn't read to the end of
the line...


ITYM "\r\n". Also, I think that you're wrong.

IIRC, when a file is opened as a text stream, '\n' is the newline
character, regardless of the system particulars. When dealing with
binary streams, this does become and issue, but this is not the case
here.

At any rate, I think that it is far better to either truncate the
newline sequence, or use strncmp.

Alex
Nov 13 '05 #8


On 11/5/2003 3:25 PM, William Payne wrote:
<snip>
But strcmp() never returns 0 so no replacement is made. So then I tried
replacing the call to strcmp() with the following:
if(strstr(line, "set imap_user=root") != NULL)

and now it founds a match one the correct line and correctly replaces the
word. Very good, but it annoys me that I don't know why strcmp() doesn't
work.
See my previous response. This should work for you:

while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line);

if(strncmp(line, "set imap_user=root", sizeof "set imap_user=root" - 1 ) =
= 0)
{

i.e. just compare the number of chars that you want to match, ignoring any
new-line characters from the input file so your code isn't dependent on the
OS/tool that produced the input file. In your final code, you'll probably want
to define a string constant or macro for "set imap_user=root" rather than
hard-coding it twice, but you get the idea. You should probably also add a
"strlen" check to ensure that line isn't actually longer than you expected (e.g.
"set imap_user=rootcrop")

Ed.
/ William Payne


Nov 13 '05 #9


On 11/5/2003 3:42 PM, Alex wrote:
Ed Morton <mo****************@lucent.com> wrote: <snip>
Not all OSs just use "\n" as the line terminator. Try adding "\n\r" instead of
just "\n". This approach still fails if "fgets()" doesn't read to the end of
the line...

ITYM "\r\n". Also, I think that you're wrong.


Could be, but just using "\n" doesn't work for him. I suppose there could just
be white-space at the end of the line. Either way...

<snip> At any rate, I think that it is far better to either truncate the
newline sequence, or use strncmp.
Truncating the newline sequence might be tough if it really isn't always "\n"
and you'd also want to truncate trailing white-space. I'd go with "strncmp()"
plus "strlen()".

Ed.
Alex


Nov 13 '05 #10
Ed Morton <mo****************@lucent.com> wrote:

On 11/5/2003 3:25 PM, William Payne wrote:
<snip>
But strcmp() never returns 0 so no replacement is made. So then I tried
replacing the call to strcmp() with the following:
if(strstr(line, "set imap_user=root") != NULL)

and now it founds a match one the correct line and correctly replaces the
word. Very good, but it annoys me that I don't know why strcmp() doesn't
work.
See my previous response. This should work for you: while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line); if(strncmp(line, "set imap_user=root", sizeof "set imap_user=root" - 1 ) =
= 0)
{ i.e. just compare the number of chars that you want to match, ignoring any
new-line characters from the input file so your code isn't dependent on the
OS/tool that produced the input file. In your final code, you'll probably want
to define a string constant or macro for "set imap_user=root" rather than
hard-coding it twice, but you get the idea. You should probably also add a
"strlen" check to ensure that line isn't actually longer than you expected (e.g.
"set imap_user=rootcrop") Ed.


Another thing that could go wrong is that what looks like a space
character is in reality a tab character, so you may have to check
with

if ( strncmp( line, "set imap_user=root",
sizeof "set imap_user=root" - 1 ) == 0 ||
strncmp( line, "set\timap_user=root",
sizeof "set\timap_user=root" - 1 ) == 0 )

for both cases.
Regards, Jens
--
_ _____ _____
| ||_ _||_ _| Je***********@physik.fu-berlin.de
_ | | | | | |
| |_| | | | | | http://www.physik.fu-berlin.de/~toerring
\___/ens|_|homs|_|oerring
Nov 13 '05 #11
Ed Morton wrote:


On 11/5/2003 3:42 PM, Alex wrote:
Ed Morton <mo****************@lucent.com> wrote:

<snip>
Not all OSs just use "\n" as the line terminator. Try adding "\n\r"
instead of
just "\n". This approach still fails if "fgets()" doesn't read to the end
of the line...

ITYM "\r\n". Also, I think that you're wrong.


Could be,


Trust me. He's right, you're wrong. Sorry, but there it is.

Whatever the platform's idea of newline is, a text file created in that
platform's native format, if opened in text mode in a C program, will
appear to have '\n' newlines, no matter what magic the runtime library must
do in order to achieve that.

(This doesn't mean that a Windows text file, opened on Linux, will magically
lose its '\r' characters. It won't.)

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #12


On 11/5/2003 4:36 PM, Richard Heathfield wrote:
Ed Morton wrote:


On 11/5/2003 3:42 PM, Alex wrote:
Ed Morton <mo****************@lucent.com> wrote:


<snip>
Not all OSs just use "\n" as the line terminator. Try adding "\n\r"
instead of
just "\n". This approach still fails if "fgets()" doesn't read to the end
of the line...
ITYM "\r\n". Also, I think that you're wrong.


Could be,

Trust me. He's right, you're wrong. Sorry, but there it is.


What? How dare you? That's it - you're killfiled for 90 days.

That is the appropriate response to being politely corrected these days, isn't
it ;-).

Thanks,

Ed.

Nov 13 '05 #13
William Payne wrote:

Hello, I need to write a program that opens a text file and scans
the entire file for a specific line and when that line is found,
a particular word on that line is to be replaced. The new word is
given as an argument to the program. I wrote a small test program
that doesn't work because strcmp() fails to find a matching line.
Here's the code:

#include <stdio.h>
#include <string.h>

int main(int argc, char** argv)
{
FILE* in_file = NULL;
FILE* out_file = NULL;
char* temporary_file_name = NULL;
char line[128];

if(argc < 2)
style note: if is not a function, follow it with a blank.
{
fprintf(stderr, "You must supply a word.\n");
return 1;
Undefined behaviour. #include <stdlib.h> and use return
EXIT_FAILURE.
}
in_file = fopen("test.txt", "r");
if(in_file == NULL)
{
fprintf(stderr, "Error opening test.txt\n");
return 1;
same thing here.
}
temporary_file_name = tmpnam(NULL);
out_file = fopen(temporary_file_name, "w");

while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line);
if(strcmp(line, "set imap_user=root") == 0)
Can never succeed. If the input line was less than 127 chars it
had at least a terminal '\n' in it. If longer the first 127 chars
wouldn't match your comparee.
{
printf("Replacing.\n");
strcpy(line, "set imap_user=");
strcat(line, argv[1]);
and even if it did compare, the result would have no final '\n'.
}

fputs(line, out_file);
}
fclose(in_file);
fflush(out_file);
fclose(out_file);

remove("test.txt");
rename(temporary_file_name, "test.txt");

return 0;
}
.... snip ...
Why doesn't it work?


Because you were very very sloppy (you asked). See above. Read
the descriptions of all the standard functions you are using. You
get points for proper declaration of main, returning a value, and
testing fopen results. You lose points for failure to check the
success of fclose, fflush, remove, and rename, failure of which
could result in permanent loss of data.

You might be advised to use a more forgiving input function. You
are welcome to ggets, available at:

<http://cbfalconer.home.att.net/download/ggets.zip>

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

Nov 13 '05 #14
Ed Morton <mo****************@lucent.com> wrote:

On 11/5/2003 3:42 PM, Alex wrote:
Ed Morton <mo****************@lucent.com> wrote: <snip>
Not all OSs just use "\n" as the line terminator. Try adding "\n\r" instead of
just "\n". This approach still fails if "fgets()" doesn't read to the end of
the line...

ITYM "\r\n". Also, I think that you're wrong.

Could be, but just using "\n" doesn't work for him. I suppose there could just
be white-space at the end of the line. Either way...
In fact, I suggested truncating the newline precisely because
it makes spotting other input anomalies (i.e. white space) much
easier.
<snip>
At any rate, I think that it is far better to either truncate the
newline sequence, or use strncmp.
Truncating the newline sequence might be tough if it really isn't always "\n"
....but it is!
and you'd also want to truncate trailing white-space. I'd go with "strncmp()"
plus "strlen()".


If you mean using the latter as an argument to the former, sure,
but how you get the length is not germane to my point.

Alex
Nov 13 '05 #15
Ed Morton <mo****************@lucent.com> wrote:

On 11/5/2003 3:25 PM, William Payne wrote:
<snip>
But strcmp() never returns 0 so no replacement is made. So then I tried
replacing the call to strcmp() with the following:
if(strstr(line, "set imap_user=root") != NULL)

and now it founds a match one the correct line and correctly replaces the
word. Very good, but it annoys me that I don't know why strcmp() doesn't
work.
See my previous response. This should work for you: while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s\n", line); if(strncmp(line, "set imap_user=root", sizeof "set imap_user=root" - 1 ) =
= 0)
{


Yes, this should work. However, I would recommend that

a) The string should be a constant defined elsewhere so that
you do not have to adjust both strings in case you decide
to change the format.

b) Use strlen instead of sizeof and lose the "-1".

Design advice to the OP:

I am guessing that you are reading in options from a file.
Things like that are much better served by some sort of a table
form such as:

struct Option
{
char *p_option;
char *p_value;
}

Parse your input into an array or linked list of such structures
in a normalized fashion, discarding newlines and unnecessary
whitespace. Then you won't have to deal with input anomalies
elsewhere and using strcmp should suffice.

Alex
Nov 13 '05 #16


Alex wrote:
Ed Morton <mo****************@lucent.com> wrote: <snip> Yes, this should work. However, I would recommend that

a) The string should be a constant defined elsewhere so that
you do not have to adjust both strings in case you decide
to change the format.
That is what I suggested in the section you snipped.
b) Use strlen instead of sizeof and lose the "-1".


Probably not a big deal in this code, but just for information: Isn't
sizeof more efficient?

Ed.

Nov 13 '05 #17
On Wed, 5 Nov 2003 22:25:52 +0100, "William Payne"
Thanks for your reply, Mr Wahler. I tried this loop as you and others
suggested:

while(fgets(line, sizeof(line), in_file))
{
printf("Line read: %s", line);

if(strcmp(line, "set imap_user=root\n") == 0)
{
printf("Replacing.\n");
strcpy(line, "set imap_user=");
strcat(line, argv[1]);
strcat(line, "\n");
}

fputs(line, out_file);
}

But strcmp() never returns 0 so no replacement is made.
You don't mention what compiler you're using, but the code works fine
when compiled with Turbo C 2.01.
So then I tried
replacing the call to strcmp() with the following:
if(strstr(line, "set imap_user=root") != NULL)

and now it founds a match one the correct line and correctly replaces the
word. Very good, but it annoys me that I don't know why strcmp() doesn't
work.

/ William Payne


Nov 13 '05 #18
Ed Morton <mo****************@lucent.com> wrote:

Alex wrote:
Ed Morton <mo****************@lucent.com> wrote: <snip>
Yes, this should work. However, I would recommend that

a) The string should be a constant defined elsewhere so that
you do not have to adjust both strings in case you decide
to change the format. That is what I suggested in the section you snipped.
My apologies, I missed it.
b) Use strlen instead of sizeof and lose the "-1".

Probably not a big deal in this code, but just for information: Isn't
sizeof more efficient?


Might be. However, as well all know, premature optimization is
the root of all evil. :-) With that in mind, 'strlen' is more
idiomatic for this case.

Alex
Nov 13 '05 #19

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

Similar topics

19
2906
by: rbt | last post by:
Here's the scenario: You have many hundred gigabytes of data... possible even a terabyte or two. Within this data, you have private, sensitive information (US social security numbers) about your...
1
5300
by: adam lital | last post by:
Hi, I have word document and i want to replace a specific text with a bookmark using code. Example: in the document i have the text and i want to replace this to a bookmark called ClientName....
0
5687
by: Balakrsihna | last post by:
Hi All, Can anyone tell me how to replace an image in MS Word 2003 using c#.net. I am converting an html file to word doc and sending this as attachment using System.Web.Mail; the...
4
1509
by: Hemant | last post by:
Hi I want to replace a word using Regular Expression for that i am using below code strResult = System.Text.RegularExpressions.Regex.Replace(strInput, txtSearch.Text.ToString().Trim(), "<b>"...
7
20882
by: gar | last post by:
Hi, I need to replace all the double quotes (") in a textbox with single quotes ('). I used this code text= Replace(text, """", "'" This works fine (for normal double quotes).The problem...
5
4743
by: Casey | last post by:
Hello, Can someone give me specific code to replace text on a page using server side javascript? I need to use server-side because I need the output to be recognized in the final HTML so that...
1
9027
by: Michael Yanowitz | last post by:
Hello: I am hoping someone knows if there is an easier way to do this or someone already implemented something that does this, rather than reinventing the wheel: I have been using the...
2
5052
by: Ola K | last post by:
Hi guys, I wrote a script that works *almost* perfectly, and this lack of perfection simply puzzles me. I simply cannot point the whys, so any help on it will be appreciated. I paste it all here,...
12
2054
by: implement | last post by:
Hi all! I try to code my own version of replace but it doesn't work. I hope somebody can help me out. It only replaces the first char!. Why I don't use the public string.replace function?...
3
3936
by: Hvid Hat | last post by:
Hi I want to highlight (make it bold) a word in some text I'm getting in XML format. My plan was to replace the word with a bold (or span) tag with the word within the tag. I've found the code...
0
7258
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,...
0
7313
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...
1
6970
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...
0
5558
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4663
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...
0
3156
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...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
366
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...

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.