Click here to Skip to main content
12,953,263 members (83,615 online)
Rate this:
Please Sign up or sign in to vote.
See more:
// String_Processingg.cpp : Defines the entry point for the console application.
#include "stdafx.h"
using namespace std;
#include <cstdlib>
void upper(string t  );
int _tmain(int argc, _TCHAR* argv[])
    char s[100];
    return 0;
void upper(string t)

Errot:No operator ++ and *matches these operand.

Please help remove these error.
thanks in advance
Posted 17-Feb-13 20:16pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

void upper(char *t );
vikrant vaibhav 18-Feb-13 2:30am
thanks ..
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

What you have here is rather a C program: all the functions you use are C library functions, not C++ functions.
The whole program is rather carelessly written:
- Don't have "using" between includes.
- Don't mix c-style includes with C++ style C library includes (the C++ style C library includes wrap the C code into namespace std). Choose one style an stick on it.
- Since you decided to use C functions, use the appropriate types (e.g. char buffer instead of string - in that case you have to decide on the string buffer size and use the respective safe gets function - or you may completely avoid a buffer and run the program character wise: getchar/putchar).
- Classical trap of omitting curly braces in a while block: the upper function's while block is brocken due to that: t++ need to be part of the loop.

Is this a code fragmet that you got to correct or is this your own code? It looks rather broken.
Sorry for not giving more clear advise. It looks like homework assignment, and you have to do it yourself to learn something.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,920

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 18 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100