View Single Post
  #1  
Old 13-10-2008, 09:53 PM
BSIT07-01's Avatar
BSIT07-01 BSIT07-01 is offline
Addicted to Computer


 
Join Date: Sep 2007
Location: ------------
Age: 34
Posts: 1,309
Contact Number: ---------------
Program / Discipline: BSIT
Class Roll Number: 07-01
BSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant future
Default 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 <iostream>
#include <string>

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<<one;

}

Reply With Quote