Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 01-20-2005, 01:52 AM   #16 (permalink)
Maani
Registered User
 
Join Date: Jan 2005
Posts: 10
Maani is on a distinguished road
Exclamation hmm yeah it worked !

Quote:
Originally Posted by Valmont
Once again, try DevCPP 5:
http://www.bloodshed.net/devcpp.html
A new version is out that removes quite a few bugs.
thanks for the link .. so the code which i posted is now working but ..
Note my next problem

#include <iostream>
#include <string>
using namespace std;

int main()
{
String Firstname;
Int ID;

cout <<"Enter ur name";
cin >> Firstname;

cout <<"Your id";
cin >> ID;

cout <<"Your name is" << Firstname << "and id is" << ID << endl;

return 0;
}

So when i run it, it says something like that :
D:\Dev-Cpp\Untitled1.cpp In function `int main()':
D:\Dev-Cpp\Untitled1.cpp `String' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
D:\Dev-Cpp\Untitled1.cpp `Int' undeclared (first use this function)
D:\Dev-Cpp\Untitled1.cpp `Firstname' undeclared (first use this function)
D:\Dev-Cpp\Untitled1.cpp `ID' undeclared (first use this function)

LOL am i that erroneous ?
Anyways, wat i can't understand in the above code is that how to assign a variable ..
Any idea .. ?
(Original COde taken from :http://cplus.about.com/od/beginnerct.../aa022302a.htm)

cout <<"Thanks for the interest";
}
:d
Maani is offline   Reply With Quote
Old 01-20-2005, 02:23 AM   #17 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
You've made typos.
Don't use capitol letters:
string instead of String
int instead of Int

Etcetera.
__________________
Valmont is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 10:46 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting