Ok it's probably still wrong ha.. works fine though.
using namespace std;
string mirrorends(string s)
{
int size = s.size();
Type: Posts; User: caffrea4
Ok it's probably still wrong ha.. works fine though.
using namespace std;
string mirrorends(string s)
{
int size = s.size();
sorry walla I don't understand what you mean.
I changed it completely I put a while loop in instead I think the code is ok now cheers.
when I had s[size - i] which is [7-0] I was comparing my first character to the character at s[7] which is not the last character as Daved and Elysia pointed out. So my first character did not = to...
oh just sank in there ha thnk you Elysia, Daved and Manasij7479. Code now works perfect :D
yeah I followed all that but still can't find my problem I know it's in the for loop when I try append the characters.
so s[i] is my first character of the string and I want to compare it to the...
ok changed my code again and it compiles and runs but displays nothing.
here's my new (and hopefully improved code):
#include <cstdlib>
#include <iostream>
#include <string>
using...
ok here's my code I'm getting an error with the strcat function
#include <cstdlib>
#include <iostream>
#include <string.h>
using namespace std;
string mirrorends(string s)
that's great that helps a lot thanks very much.
can anyone help me with a problem I'm kinda new to C++. Here is my question:
Write a function of the form string mirrorEnds(string), that when given a string, looks for a mirror image (backwards)...
I'v only started to learn c++ this year so maybe this is just a simple problem.
here is the question I was given:
Write a function of the form int countEvens(int[], int) that returns the...
i need the program to read from a file and write to a file.. everything was working perfectly until i tried to add a menu to it. Here's my code. Any help is appreciated.
#include <stdio.h>...