by: Hans |
last post by:
Hello,
Why all C/C++ guys write:
const char* str = "Hello";
or
const char str = "Hello";
|
by: Michaël Boland |
last post by:
I have a fonction to trim a string :
char *trimstr(char *pbuf1)
{
char *pbuf2 , *pbuf3;
pbuf2 = pbuf1 ;
pbuf3 = pbuf1 ;
while(*pbuf1 != '\0') { if(*pbuf1 != ' ') { pbuf2 = pbuf1; pbuf2++;...
|
by: Sona |
last post by:
Hi,
What's the advantage/disadvantage of using a "const char*" over a
"char*" ? I read some place that char* are string literals that on some
machines are stored in a read only memory and cannot...
|
by: Joachim Schmitz |
last post by:
Hi folks
Is it legal for a C compiler that claims to be conforming to the standard
(c89) to issue an error on the following:
char *foo(const char *s)
{
const char *s;
for (s = src; *s &&...
|
by: jab3 |
last post by:
(again :))
Hello everyone.
I'll ask this even at risk of being accused of not researching adequately.
My question (before longer reasoning) is: How does declaring (or defining,
whatever) a...
|
by: andrew.fabbro |
last post by:
In a different newsgroup, I was told that a function I'd written that
looked like this:
void myfunc (char * somestring_ptr)
should instead be
void myfunc (const char * somestring_ptr)
...
|
by: lovecreatesbeauty |
last post by:
There is a warning/(error? I remember it is an error for line 10 on
some compilers before. At least on g++, it is an error.) for line 10. I
first read a similar example from `Expert C Programming...
|
by: liujiaping |
last post by:
I'm confused about the program below:
int
main(int argc, char* argv)
{
char str1 = "abc";
char str2 = "abc";
const char str3 = "abc";
const char str4 = "abc";
const char* str5 = "abc";
|
by: LuxOcculta |
last post by:
Hello, I need some help..
I have to replace in s1, the string s2 with the string s3. I first found if s2 was a substring in s1, but i dont know what to do from here, I'm lost..
example: s1 =...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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,...
|
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...
|
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...
|
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...
|