473,727 Members | 1,993 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help me with Concatenating strings

c
Hi everybody.

I'm working on converting a program wriiten on perl to C, and facing a
problem with concatenate strings.
Now here is a small program that descripe the problem, if you help me
to solve in this small code, I can solve it on my own program...you
don't want to have head-ache :-)

So, the problem excatly is, I built an array..just like this one.

char *my_array [10];
my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";

my program will recieve an argument -char *argv[]- from the user.

int main(int argc,char *argv[])
I want to concatenate the given argument to at the first of each line
of my array.
so, if we imagine the array after the concatenating, it would look like
this (suppose the given argument is "ILove").

my_array[0] = "ILoveSally \n";
my_array[1] = "ILoveNdiya \n";
my_array[2] = "ILovesamantha\ n";
my_array[3] = "ILoveSara\ n";
my_array[4] = "ILoveCadillac\ n";
my_array[5] = "ILoveGM For Ever\n";
my_array[6] = "ILoveSlacWare\ n";
my_array[7] = "ILoveGoogle\n" ;
my_array[8] = "ILoveGoogl e again\n";
my_array[9] = "ILoveSAMI\ n";
my_array[10] = "ILoveComputers \n";*/

I tried strcat() -strings.h- but the result wasn't what I'm looking
for.

read the code..and the comments will help to understand the
problem..here is the whole code of my problem example.

#include <stdio.h>

int main(int argc,char *argv[])
{int i=-1;
char *my_array [10];

my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";

while(i++ < 10)
{
printf(argv[1]); //Don't do it like this..read my comments please.
printf(my_array[i]);
}

// I need your help to fix below loop, I want to cancatenate the given
data -*argv[]- to each line of my array.
// For Example, if the user enetered
// root@localhost# test ILove
// the result would be:
// ILoveSally
// ILoveNdiya
// ..etc
//
//But don't do it by printting the given data followed by my_array
lines(I mean by printting it twoice), because I need the given data to
be concatenated at the first of each line of my array.
//So, my_array would look like this
// my_array[0] = "ILoveSally \n";
// my_array[1] = "ILoveNdiya \n";
// my_array[2] = "ILovesamantha\ n";
// my_array[3] = "ILoveSara\ n";
// my_array[4] = "ILoveCadillac\ n";
// my_array[5] = "ILoveGM For Ever\n";
// my_array[6] = "ILoveSlacWare\ n";
// my_array[7] = "ILoveGoogle\n" ;
// my_array[8] = "ILoveGoogl e again\n";
// my_array[9] = "ILoveSAMI\ n";
// my_array[10] = "ILoveComputers \n";*/

while (i++ < 10)
{
// type your code here..Thanks
}
return 0;
}
thank you for your time.

Sep 24 '06 #1
21 2321
you can't change anything in that array, as those are all read-only
constants.

So you either need another array, either fixed size strings, or get the
memory dynamically, either thru malloc() or out of your own array. I
recommend something aloong the lines of the latter for simplicity. Not
tested, but generally on track below code is. Add some obvious error
checks for extra credit. Use snprintf for extra safety.
char BigPool[ 1000000 ]; // or whatever size you expect;

char Strs[ STRINGS_IN_LIST ] = { "foo", "bar", ........ };
int Free = 0;

int i, Len;

for( i = 0; i < STRINGS_IN_LIST ; i++ )
Free += sprintf( BigPool[ Free ], "%s%s", argv[ whatever ], Strs[
i ] ) + 1;

Sep 24 '06 #2
oops, I forgot to log the address of each created string, try this:
char BigPool[ 1000000 ]; // or whatever size you expect;

char Strs[ STRINGS_IN_LIST ] = { "foo", "bar", ........ };

char * OutStrs[ STRINGS_IN_LIST ];
int Free = 0;

int i, Len;

for( i = 0; i < STRINGS_IN_LIST ; i++ )
Free += sprintf( OutStrs[ i ] = BigPool[ Free ], "%s%s", argv[
whatever ], Strs[ i ] ) + 1;

Sep 24 '06 #3
c posted:
char *my_array [10];

This array contains ten elements.

my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";

Here, you assign to eleven separate elements.

#include <stdio.h>

int main(int argc,char *argv[])
{int i=-1;
char *my_array [10];

my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";

Again here, you assign to eleven elements.

while(i++ < 10)
{
printf(argv[1]); //Don't do it like this..read my comments please.
printf(my_array[i]);
}

Why resort to that? Looping 0 through 10 can be much simpler:

unsigned i = 0;

do {

}while(++i != 11);

Or, if you'd prefer the less efficient simplicity of:

for(unsigned i = 0; i != 11; ++i)
{

}

You're still pretending that you're array has eleven elements though...

--

Frederick Gotham
Sep 24 '06 #4
c
Thank you, but this is just a peace of code i don't care about it that
much.

Frederick Gotham wrote:
c posted:
char *my_array [10];


This array contains ten elements.

my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";


Here, you assign to eleven separate elements.

#include <stdio.h>

int main(int argc,char *argv[])
{int i=-1;
char *my_array [10];

my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";


Again here, you assign to eleven elements.

while(i++ < 10)
{
printf(argv[1]); //Don't do it like this..read my comments please.
printf(my_array[i]);
}


Why resort to that? Looping 0 through 10 can be much simpler:

unsigned i = 0;

do {

}while(++i != 11);

Or, if you'd prefer the less efficient simplicity of:

for(unsigned i = 0; i != 11; ++i)
{

}

You're still pretending that you're array has eleven elements though...

--

Frederick Gotham
Sep 24 '06 #5
c
Thank you for helping me, I'm going to try and reply again if I have
some Questions.

Ancient_Hacker wrote:
oops, I forgot to log the address of each created string, try this:
char BigPool[ 1000000 ]; // or whatever size you expect;

char Strs[ STRINGS_IN_LIST ] = { "foo", "bar", ........ };

char * OutStrs[ STRINGS_IN_LIST ];
int Free = 0;

int i, Len;

for( i = 0; i < STRINGS_IN_LIST ; i++ )
Free += sprintf( OutStrs[ i ] = BigPool[ Free ], "%s%s", argv[
whatever ], Strs[ i ] ) + 1;

.
Sep 24 '06 #6
c wrote:
Hi everybody.

I'm working on converting a program wriiten on perl to C, and facing a
problem with concatenate strings.
Now here is a small program that descripe the problem, if you help me
to solve in this small code, I can solve it on my own program...you
don't want to have head-ache :-)

So, the problem excatly is, I built an array..just like this one.

char *my_array [10];
my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";
"Just like" this one? Including the attempt to store a
value in the non-existent eleventh element of a ten-element
array? In C an array of N elements has indices that run from
[0] through [N-1], inclusive, but does not have an [N] element.

By the way, C offers a more convenient syntax for array
initialization:

char *my_array[10] = { "Sally\n", "Ndiya\n", "Samantha\n ",
"Sara\n", "Cadillac\n ", "GM For Ever\n", "SlacWare\n ",
"Google\n", "Google more and more\n", "You\n",
"Computers\ n", };

A few points about this: First, since you've declared the array
to have ten elements but actually provided eleven initializers,
the compiler will complain and point out your mistake. Second,
you could replace [10] with [] and let the compiler figure out
the array size by counting the initializers itself instead of
making you do it (sizeof my_array / sizeof my_array[0] will then
tell you how big the compiler decided the array should be). And
last, the comma after the final initializer is optional -- it's
sometimes convenient if the code is being generated by a program
or if you anticipate adding more initializers later, but you can
use it or omit it according to your own taste.
my program will recieve an argument -char *argv[]- from the user.

int main(int argc,char *argv[])

I want to concatenate the given argument to at the first of each line
of my array. [...]
You need to confront the simplicity of C's memory management.
I mean "simplicity " in the sense that C doesn't do very much about
memory management on its own; you must attend to it for yourself.
This is both a weakness and a strength of C: It's a weakness because
it forces you to fret about the details, and a strength because it
doesn't burden you with the machinery of automatic managers whose
style may not suit your needs.

In this case, C has already done some minimal memory management
for you: It has set aside space for the array my_array and filled
its elements with pointers to strings, and it has set aside space
for those strings and filled them with their intended contents. But
now you need something different: You need to create new strings in
memory someplace, and change the array elements to point to those
new strings instead of the old ones.

Here's a quickie solution, with explanation to follow:

for (i = 0; i < sizeof my_array / sizeof my_array[0]; ++i) {
char *new;
new = malloc(strlen(a rgv[1]) + strlen(my_array[i]) + 1);
if (new == NULL)
exit (EXIT_FAILURE);
strcpy (new, argv[1]);
strcat (new, my_array[i]);
my_array[i] = new;
}

The first line steps the variable i through all the valid index
values of the array my_array, executing the body of the loop once
for each i value. The second line declares a temporary variable called
new that will point to the memory for one of the new strings you're
about to create -- you can't just obliterate my_array[i] yet, because
you still need to work with the original string it's still pointing to.

The third line requests some memory to be allocated. How much?
You'll need enough for all the characters of the argv[1] string, plus
enough for all the characters of the my_array[i] string, plus one more
for the '\0' that must be present at the end of any string. (It is
astonishing how frequently people forget about that "plus one;" be
on guard against making that all-too-commmon mistake.)

The fourth and fifth lines are important: You call malloc to
*request* a certain amount of memory, but the request might not be
granted. Perhaps the system is running low on memory, perhaps it
has plenty available but it's all scattered around in dribs and
drabs none of which are big enough, perhaps the phase of the Moon
is wrong. *Always* check for a NULL return from malloc, and take
corrective action if you get one -- in this case, the "corrective
action" is simply to terminate the program unsuccessfully, but in
other programs you might do something more elaborate.

The sixth and seventh lines build the new string from the two
pieces. Line six copies the argv[1] string into the new memory area,
and line seven appends the my_array[i] string to it. Note carefully
that line six uses strcpy and seven uses strcat; it would be wrong
to interchange them or to use the same function (either one) in both
places. You need to copy the first string into the uninitialized
brand-new memory area, and then append the second.

Finally, line eight changes my_array[i] so it now points to the
newly-built string.

At the beginning of the program, you'll need to #include the
<string.hhead er (to declare the strlen, strcpy, and strcat functions)
and the <stdlib.hhead er (for malloc, exit, and EXIT_FAILURE). You
may need other headers like <stdio.hif you intend to display any
results. Also, it would be a good idea for your program to check
that it actually received an argument string (check for argc>1)
before running blindly ahead and trying to do things with a string
that doesn't even exist.

--
Eric Sosman
es*****@acm-dot-org.invalid
Sep 24 '06 #7
c
THANK YOU VERY VERY MUCH, I'm going to try it and reply if I have
another questions..you just wrote an article for me, it must be printed
:-)

Eric Sosman wrote:
c wrote:
Hi everybody.

I'm working on converting a program wriiten on perl to C, and facing a
problem with concatenate strings.
Now here is a small program that descripe the problem, if you help me
to solve in this small code, I can solve it on my own program...you
don't want to have head-ache :-)

So, the problem excatly is, I built an array..just like this one.

char *my_array [10];
my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";

"Just like" this one? Including the attempt to store a
value in the non-existent eleventh element of a ten-element
array? In C an array of N elements has indices that run from
[0] through [N-1], inclusive, but does not have an [N] element.

By the way, C offers a more convenient syntax for array
initialization:

char *my_array[10] = { "Sally\n", "Ndiya\n", "Samantha\n ",
"Sara\n", "Cadillac\n ", "GM For Ever\n", "SlacWare\n ",
"Google\n", "Google more and more\n", "You\n",
"Computers\ n", };

A few points about this: First, since you've declared the array
to have ten elements but actually provided eleven initializers,
the compiler will complain and point out your mistake. Second,
you could replace [10] with [] and let the compiler figure out
the array size by counting the initializers itself instead of
making you do it (sizeof my_array / sizeof my_array[0] will then
tell you how big the compiler decided the array should be). And
last, the comma after the final initializer is optional -- it's
sometimes convenient if the code is being generated by a program
or if you anticipate adding more initializers later, but you can
use it or omit it according to your own taste.
my program will recieve an argument -char *argv[]- from the user.

int main(int argc,char *argv[])

I want to concatenate the given argument to at the first of each line
of my array. [...]

You need to confront the simplicity of C's memory management.
I mean "simplicity " in the sense that C doesn't do very much about
memory management on its own; you must attend to it for yourself.
This is both a weakness and a strength of C: It's a weakness because
it forces you to fret about the details, and a strength because it
doesn't burden you with the machinery of automatic managers whose
style may not suit your needs.

In this case, C has already done some minimal memory management
for you: It has set aside space for the array my_array and filled
its elements with pointers to strings, and it has set aside space
for those strings and filled them with their intended contents. But
now you need something different: You need to create new strings in
memory someplace, and change the array elements to point to those
new strings instead of the old ones.

Here's a quickie solution, with explanation to follow:

for (i = 0; i < sizeof my_array / sizeof my_array[0]; ++i) {
char *new;
new = malloc(strlen(a rgv[1]) + strlen(my_array[i]) + 1);
if (new == NULL)
exit (EXIT_FAILURE);
strcpy (new, argv[1]);
strcat (new, my_array[i]);
my_array[i] = new;
}

The first line steps the variable i through all the valid index
values of the array my_array, executing the body of the loop once
for each i value. The second line declares a temporary variable called
new that will point to the memory for one of the new strings you're
about to create -- you can't just obliterate my_array[i] yet, because
you still need to work with the original string it's still pointing to.

The third line requests some memory to be allocated. How much?
You'll need enough for all the characters of the argv[1] string, plus
enough for all the characters of the my_array[i] string, plus one more
for the '\0' that must be present at the end of any string. (It is
astonishing how frequently people forget about that "plus one;" be
on guard against making that all-too-commmon mistake.)

The fourth and fifth lines are important: You call malloc to
*request* a certain amount of memory, but the request might not be
granted. Perhaps the system is running low on memory, perhaps it
has plenty available but it's all scattered around in dribs and
drabs none of which are big enough, perhaps the phase of the Moon
is wrong. *Always* check for a NULL return from malloc, and take
corrective action if you get one -- in this case, the "corrective
action" is simply to terminate the program unsuccessfully, but in
other programs you might do something more elaborate.

The sixth and seventh lines build the new string from the two
pieces. Line six copies the argv[1] string into the new memory area,
and line seven appends the my_array[i] string to it. Note carefully
that line six uses strcpy and seven uses strcat; it would be wrong
to interchange them or to use the same function (either one) in both
places. You need to copy the first string into the uninitialized
brand-new memory area, and then append the second.

Finally, line eight changes my_array[i] so it now points to the
newly-built string.

At the beginning of the program, you'll need to #include the
<string.hhead er (to declare the strlen, strcpy, and strcat functions)
and the <stdlib.hhead er (for malloc, exit, and EXIT_FAILURE). You
may need other headers like <stdio.hif you intend to display any
results. Also, it would be a good idea for your program to check
that it actually received an argument string (check for argc>1)
before running blindly ahead and trying to do things with a string
that doesn't even exist.

--
Eric Sosman
es*****@acm-dot-org.invalid
Sep 24 '06 #8
c wrote:
>
I'm working on converting a program wriiten on perl to C, and
facing a problem with concatenate strings.
Try strlcat and strlcpy. You can get source and documentation for
these from:

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

--
Some informative links:
<news:news.anno unce.newusers
<http://www.geocities.c om/nnqweb/>
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html >
<http://www.netmeister. org/news/learn2quote.htm l>
<http://cfaj.freeshell. org/google/>
Sep 24 '06 #9
Frederick Gotham wrote:
c posted:
>char *my_array [10];


This array contains ten elements.

> my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";


Here, you assign to eleven separate elements.
To someone who is new at C, the above code would not be as easy to
notice something wrong in.

In c array indexing starts at 0. When you declare char *my_array[10];
you are saying the following: "Give me an array of 10 pointers to type
char". You can now safely assign to 0 - 9 of those without worrying.
Assigning to anything beyond index 9 would invoke UB (Undefined Behaviour).

It is also important for you to note that in your declaration you are
(in laymen terms) saying: "Give me an array of 10 pointers to type char
that I may not modify after initialization" .

For example:

char *foo;

/* this is fine. you are initializing foo */
foo = "some string";

/* this is fine too. you are declaring and initializing foo */
char *foo = "some string";

/* this is *not* fine. you are writing to memory that you shouldn't */
foo[3] = '\0';

char foo[100];

/* the below is fine. we are allowed to write to foo provided that we do
not go beyond element 99. */
strcpy(foo, "testing");

foo[4] = '\0';
>
>#include <stdio.h>

int main(int argc,char *argv[])
{int i=-1;
char *my_array [10];

my_array[0] = "Sally\n";
my_array[1] = "Ndiya\n";
my_array[2] = "Samantha\n ";
my_array[3] = "Sara\n";
my_array[4] = "Cadillac\n ";
my_array[5] = "GM For Ever\n";
my_array[6] = "SlacWare\n ";
my_array[7] = "Google\n";
my_array[8] = "Google more and more\n";
my_array[9] = "You\n";
my_array[10] = "Computers\ n";


Again here, you assign to eleven elements.

>while(i++ < 10)
{
printf(argv[1]); //Don't do it like this..read my comments please.
printf(my_array[i]);
}


Why resort to that? Looping 0 through 10 can be much simpler:

unsigned i = 0;

do {

}while(++i != 11);
This isn't safe, especially if you're suggesting that someone who is
obviously new to C to use it. What happens if OP increments i within the
while loop? Consider the following:

i = 0;

do
{
i += 20;
} while(++i != 11);

There you have an infinite loop and the OP may not know what is wrong.
The code below would give clearer meaning of your intent.

i = 0;

do
{
/* code */
} while (++i < 11);
>
Or, if you'd prefer the less efficient simplicity of:

for(unsigned i = 0; i != 11; ++i)
Not valid C89 or C90 syntax. Variable declarations must be at the
beginning of a block. Again you insist on checking i to see if it is
*exactly* 11.
{

}

You're still pretending that you're array has eleven elements though...
It would be more helpful if you could point out to the OP *why* (see my
reply towards the top).
Sep 24 '06 #10

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

Similar topics

1
2050
by: dont bother | last post by:
Hey, I have these attributes: index which is a numerical value value vector which is a numerical float value and I want to concatenate like this:
17
4232
by: Douglas Alan | last post by:
Is there a canonical way of iterating over the lines of a file that are null-separated rather than newline-separated? Sure, I can implement my own iterator using read() and split(), etc., but considering that using "find -print0" is so common, it seems like there should be a more cannonical way. |>oug
2
2085
by: Tim | last post by:
In an ASP web page I am trying to calculate a value in seconds from two date and times. Can anyone help me find the correct syntax to make this work?!?! (This code below work correctly) DetectionTime=#7/30/03 10:36:45 AM# MyTime=#7/30/03 10:36:45 PM# TTClose=(MyTime)-(DetectionTime) TTTClose=(((TTClose*24)*60)*60)
4
10635
by: sankofa | last post by:
hi, i can't seem to be able to escape my single quote properly... is it even possible in javascript? this is a portion of my code.. var DLEWIS="Pastor Lewis"; .... Sermon is a yser-defined class .. var en_20031102=new Sermon("11/02",DLEWIS,"The Lord\'s Supper: The Art Of
53
8275
by: Allan Bruce | last post by:
Hi there, I am reading a file into a char array, and I want to find if a string exists in a given line. I cant use strcmp since the line ends with '\n' and not '\0'. Is there a similar function that will do this, or will I have to write my own? Thanks Allan
4
2346
by: Juan | last post by:
Does any one know if there are reported bugs when concatenating strings? When debugging each variable has the correct value but when I try to concatenate them some values are missing (I can´t see them in the debugger). After encoding the string (the sameone which complete value is not visible from the debugger) all the values can be seen but they are spaced by big amounts of zeros and use more that the 2048 bytes allocated. It is like if...
1
3680
by: ebobnar | last post by:
I need to call the function LoadImage which take a LPCTSTR argument to specify the path to the image to load. However, I need to create this path dynamically from user input by concatenating strings together. I'm using visual c++.net 2003. I've tried using the String class to put the image path together and then cast the String to a LPCTSTR, but that cast is forbidden. Since I'm using visual c++.net should I not be using functions like...
43
2227
by: ZillionDollarSadist | last post by:
Hello, I'm working at a simple Access '97 + VB4 application, and I ran into a terrible problem: something I never modified now gives me a totally unwanted "Invalid use of null" error. It happens in a Text.LostFocus event, this block: Do While Not TB6.EOF If Year(TB6(0)) = Val(Trim(Text1.Text)) Then !!!!!!!!!!!!!Here!!!!!!!!! ...
24
9063
by: ChaosKCW | last post by:
Hi I am reading from an oracle database using cx_Oracle. I am writing to a SQLite database using apsw. The oracle database is returning utf-8 characters for euopean item names, ie special charcaters from an ASCII perspective. I get the following error: > SQLiteCur.execute(sql, row)
0
8890
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
9402
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
9259
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
9182
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
9120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8101
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6011
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
4785
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.