Doesn't recognize string

even after including the string library,

For example, in this code:
#include <fstream>
#include <iostream>
#include <String>

using namespace std;

String Reverse(String second)

(this is just a small section of it, Reverse is funtion)

it gives me errors that says it doesn't know what a string is and
errors like this:


1>c:\documents and settings\administrator\my documents\visual studio 2008\projects\dscsdc\czx\main.cpp(7) : error C2146: syntax error : missing ';' before identifier 'Reverse'
1>c:\documents and settings\administrator\my documents\visual studio 2008\projects\dscsdc\czx\main.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\administrator\my documents\visual studio 2008\projects\dscsdc\czx\main.cpp(7) : error C2146: syntax error : missing ')' before identifier 'second'
1>c:\documents and settings\administrator\my documents\visual studio 2008\projects\dscsdc\czx\main.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int


Also it doesn't recognize strings in the main section of the code.


Note: i use microsoft visual c++ 2008 express
"string" all word write with small letters.
http://www.cplusplus.com/reference/string/string/
Karql is correct - "string Reverse(string second)"
This is an example of problems that are common in languages like C++ which are case sensitive, you need to be sure that you always use exactly the same case.
You can also end up with difficult to trace bugs if you have varaible names that differ only by case, EG 'MyString' and 'myString' as mistypeing one can lead to a program that compiles but does (apparently) inexplicable things:-)
Yeah it's a pain in the butt when that stuff happens
@Mythios:
It was my knowledge of english fault. I wrote "all", there should be "whole".
Haha, all is good. As long as it's all working now :)
ty for the help, i had all the strings in capitalized because the previous string library i used required that you used a capital "S" instead of lower-case "s", thank you guys for clarifying this
Topic archived. No new replies allowed.