Hi All,
I want to know that how does the string differ from char* and why was the string class needed in C++ while char * was already there?
Can anyone help me please?
Type: Posts; User: oranges
Hi All,
I want to know that how does the string differ from char* and why was the string class needed in C++ while char * was already there?
Can anyone help me please?
Hi all,
I need to design and implement a String class for the given code, and this class should store the string in a dynamically allocated memory.
int main()
{
String s1, s2 =...
Thank you so much for all the guidance. :)...
Thanks a lot. It worked really well with my code. See, if 'm wrong at any point, by any aspect, let me know please.
class Colors
{
private:
int code;
char color[25];
...
Sorry Sir. I'm new to OOP and confused about different things, as well. Besides this confusion, pointers weren't my first preference, as evident from my first post.
BTW, thanks for the guidance. :)
Thanks for the reply.
Ok, I may use strings. But I want to know how to do that with character type. Now, see, If I use char*, like
class Colors
{
private:
int code;
...
Hi all,
I'm trying to declare a data member of a class as char (array type) and then want to use it outside the class as well. I may use it by getter function but 'm not declaring it properly, I...
Hi all,
I'm new over here n want some help. What will be the solution, if we want to find out even/odd number without using divsion or modulus operator?
Best Regards.