Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
C++ Concatenation
Name: C++ Newbie Date: December 3, 2001 at 07:44:59 Pacific
Comment:
i'm trying to concatenate two strings together, but can't get them to work, Can anyone help me please!??!?!! I concatenation of text objects work, but the string concatenation won't compile. Here is a chunk of the code...
cout << "\nUse of concatenation += of a text object\n"; text surname("Jones"); text fullname("Pat"); fullname += surname; fullname.show();
cout << "\nUse of concatenation of a string object\n"; text fullname2("Pat"); fullname2 += ("Jones"); fullname2.show();
Name: me Date: December 6, 2001 at 14:29:30 Pacific
Reply:
howcome you did void main
whats the difference if i were to say int main and then just return 0; ? thanx
0
Response Number 3
Name: GigaHertz Date: December 10, 2001 at 14:24:37 Pacific
Reply:
if you use int main() you have to return a int, but you don't need that because your program is not called by an other one. is like a function, if you don't need a return variable you put void.
GigaHertz
sorry for my english.
0
Response Number 4
Name: v0lumity Date: January 14, 2002 at 18:31:02 Pacific
Reply:
Void saves memory as nothing will be returned and placed into memory. If you return 0, this 0 needs to be placed in memory. Simple.
0
Response Number 5
Name: madhu Date: March 11, 2002 at 03:09:43 Pacific
Reply:
Hi, How do i declare a function that returns a charecter array in a c++ class. Also can a charecter be appended to a string? Thanx
Summary: I have just started learning to create Win32 Apps in C++. I am trying to make a program with a dialog box that displays the sum of the values (entered into 2 textboxes) in a static text. It works fi...
Summary: I have just started learning C++, in specific Win32 applications. I have a few problems: 1. Whenever i try to use the strcat function to concatenate two const char*'s, LPSTR's or other strings my pro...
Summary: It looks like you'll need to declare an array of char then use sprintf to convert the number i into a string before you can use string concatenation. I assume that is in C and not C++. ...