// New2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
void reverse(string& s);
int _tmain(int argc, _TCHAR* argv[])
{
string st="Word" ;
cout<<st<<"\n";
reverse(st);
cout<<st<<"\n";
return 0;
}
void reverse(string& st)
{
int i;
int j = 1;
for(i=0; i<strlen(str); i++, j++);
rev[strlen-[j]=st[i];
for(i=0; <strlen(st); i++);
str[i]=rev[i];
st="New World";
return;
}
I have the reverse function wrong. Please hekp me with this, I am very new to programming.
**If you could please how me how to ask for a string in an array and reverse it or add two strings.
Thank you very much.:cool: