BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/)
-   Object Oriented Programming (http://bzupages.com/35-object-oriented-programming/)
-   -   Append Function of String In C++ Programming (http://bzupages.com/f35/append-function-string-c-programming-989/)

BSIT07-01 13-10-2008 09:53 PM

Append Function of String In C++ Programming
 
Execute tu nai ho raha ...
But i think that it is correct,...
Fatal errors day raha hay...
But Madam nay kaha tha sahi hay program..

Code:


#include
#include

using namespace std;





string myappend(string c,int a,char b)
{
string characters;
int n=0;
while(n<=a)
{
    characters[n]=b;
    n++;
}
c=c+characters;

return c;
}





void main()
{
string one="My string";
int n=4;
char ch='w';

one=myappend(one,n,ch);
cout<
}


Danish Hussain 13-10-2008 11:46 PM

Re: Append Function
 
o thnkx bro.

:alcoholic:


All times are GMT +5. The time now is 12:09 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.