inherit
8696
0
Jan 3, 2024 23:35:38 GMT -8
The Dark Knight
Hope is a dangerous thing.
38,980
April 2003
avtar
|
Post by The Dark Knight on Jul 30, 2005 1:54:45 GMT -8
|
|
inherit
52378
0
Aug 1, 2005 1:31:12 GMT -8
tensuke
16
July 2005
tensuke
|
Post by tensuke on Jul 30, 2005 2:37:55 GMT -8
Um how do I get it?I went to the page and it was code,and I went to the site(nice BTW) and couldn't find a link. Is it just the code?Because if I'm just supposed to comment on the code,then it's great. BTW,what's that font in your art museum sig pic,on the top?I've never known what that is...
|
|
inherit
Banned
29372
0
Sept 7, 2005 14:30:48 GMT -8
It's me again
3,197
August 2004
prohibited
|
Post by It's me again on Jul 30, 2005 8:06:14 GMT -8
Um how do I get it?I went to the page and it was code,and I went to the site(nice BTW) and couldn't find a link. Is it just the code?Because if I'm just supposed to comment on the code,then it's great. BTW,what's that font in your art museum sig pic,on the top?I've never known what that is... You have to compile it.
I tried compiling it and got over 200 errors...o.0
|
|
inherit
8696
0
Jan 3, 2024 23:35:38 GMT -8
The Dark Knight
Hope is a dangerous thing.
38,980
April 2003
avtar
|
Post by The Dark Knight on Jul 30, 2005 9:58:39 GMT -8
I made it using Borland C++, and it shows no errors at all.
Stupid compiler differences. Did you use Turbo C++? Because I think that one has problems with the GOTOXY function.
|
|
inherit
Banned
29372
0
Sept 7, 2005 14:30:48 GMT -8
It's me again
3,197
August 2004
prohibited
|
Post by It's me again on Jul 30, 2005 11:51:56 GMT -8
Dev-C++
|
|
inherit
22517
0
Apr 30, 2009 18:49:13 GMT -8
Bradley
Has a new webhost. :) Needs to transfer a lot of stuff. :-/
5,246
April 2004
ccworldwebmaster
|
Post by Bradley on Jul 30, 2005 13:01:30 GMT -8
I got numerous errors with MS Visual C++ 7.1. It doesn't like to refernce fstream.h directly; iostream seems to work better with it. just drop the .h part. After the includes throw using namespace std; into the document so it doesn't complain about undefined functions cin() and cout(). It proceded to produce about 44 95 (now that I got fstream to load) errors on every use of finout, gotoxy, and clrscr. This might help with some of your "problems": www.daniweb.com/techtalkforums/thread11430.htmlYou should upload a compiled version to, since compliers don't like you.
|
|
inherit
EXOH
27575
0
Nov 12, 2007 22:40:30 GMT -8
J. Meeter
i do my crosswords in pen
8,249
July 2004
modernxxromance
|
Post by J. Meeter on Jul 30, 2005 20:15:45 GMT -8
From a friend:
|
|
xubl
inherit
-149439
0
Dec 2, 2024 12:42:07 GMT -8
xubl
0
January 1970
GUEST
|
Post by xubl on Jul 30, 2005 20:50:24 GMT -8
Tar knows C++!
|
|
inherit
g4m3 0v3r
771
0
Jul 18, 2011 18:29:23 GMT -8
David (Monty)
3,669
December 1999
mbarker22
|
Post by David (Monty) on Jul 30, 2005 21:11:09 GMT -8
Nice program Had a little trouble compiling on GCC, but I finally did. Good work ;D
|
|
inherit
8696
0
Jan 3, 2024 23:35:38 GMT -8
The Dark Knight
Hope is a dangerous thing.
38,980
April 2003
avtar
|
Post by The Dark Knight on Jul 30, 2005 22:44:12 GMT -8
1. Thanks Monty. 2. Yes Zo, Tar knows C++. 3. IEYHO, Thanks for that. I'm using Borland C++ 5.02, we need to specify .h in them as header files. As for cstring and all that, I doubt header files change that much, but these are the standard header files. I'm sure your friends compiler uses a different style of header files that have certain alterations in them, or like some of mine, he's made some of his own header files. I've declared the phone number as long because some people might want to enter Country Codes in them as well, making them very large. I don't like using pointers.
4. CCWorld, Cin and Cout undefined functions? They're the basics of C++ and of the most basic file, IOSTREAM. Gotoxy is a print locator, useful for formatted outputs. Finout is a function I created for the file fstream so that I can handle my files. Clrscr is a clear screen function. Yeah, next time I might as well upload a .exe file.
Cheers. ;D
|
|
inherit
g4m3 0v3r
771
0
Jul 18, 2011 18:29:23 GMT -8
David (Monty)
3,669
December 1999
mbarker22
|
Post by David (Monty) on Jul 30, 2005 23:07:39 GMT -8
4. CCWorld, Cin and Cout undefined functions? They're the basics of C++ and of the most basic file, IOSTREAM. Gotoxy is a print locator, useful for formatted outputs. Finout is a function I created for the file fstream so that I can handle my files. Clrscr is a clear screen function. Yeah, next time I might as well upload a .exe file. When using the newer header files (without the .h in them, and cstring, cstdlib, etc.), things like cin, cout, endl, fstream, etc. are declared in namespace std, so you need to either fully qualify the names with std:: (std::cout, std::cin, std::endl, std::fstream, etc.), place "using namespace std;" after the list of includes, or place "using std::cout;", "using std::endl;", etc. after the list of includes. For example: Method 1: #include <iostream>
int main() { std::cout << "Hello world" << std::endl; return 0; } Method 2: #include <iostream> using namespace std;
int main() { cout << "Hello world" << endl; return 0; } Method 3: #include <iostream> using std::cout; using std::endl;
int main() { cout << "Hello world" << endl; return 0; } Namespaces help avoid name conflicts. I often use the first method, even though it's more typing, because it nearly eliminates naming conflicts. The standard namespace contains a LOT of names. If you include just a few standard library files, and place "using namespace std;" under them, most of the good variable names will be unavailable to use for your own variables!
|
|
inherit
8696
0
Jan 3, 2024 23:35:38 GMT -8
The Dark Knight
Hope is a dangerous thing.
38,980
April 2003
avtar
|
Post by The Dark Knight on Jul 30, 2005 23:11:10 GMT -8
Isn't just:
#include <iostream.h>
void main() { cout<<"BLAH!"; }
So much simpler. lol.
|
|
squalleh
inherit
-149444
0
Dec 2, 2024 12:42:07 GMT -8
squalleh
0
January 1970
GUEST
|
Post by squalleh on Jul 31, 2005 10:00:51 GMT -8
Isn't just:
#include <iostream.h>
void main() { cout<<"BLAH!"; }
So much simpler. lol. No, you have to define namespaces. The cin, cout, and endl functions are all a part of the standard namespace. So, the proper way to use them is: #include <iostream>
int main () { std::cout << "Boo!" << std::endl; return 0; }
Of course, as mentioned above you could do a couple different things. One would be to define the standard namespace all together (example 1 at the bottom), or to define the specific functions (example 2). Example 1 #include <iostream>
using namespace std;
int main () { cout << "Boo!" << endl; return 0; }Example 2 #include <iostream>
using std::cout; using std::endl;
int main () { cout << "Boo!" << endl; return 0; }
|
|
inherit
Banned
29372
0
Sept 7, 2005 14:30:48 GMT -8
It's me again
3,197
August 2004
prohibited
|
Post by It's me again on Jul 31, 2005 20:01:52 GMT -8
I WANNA SEE IT!someone compile it!
|
|
inherit
8696
0
Jan 3, 2024 23:35:38 GMT -8
The Dark Knight
Hope is a dangerous thing.
38,980
April 2003
avtar
|
Post by The Dark Knight on Aug 1, 2005 2:59:12 GMT -8
I'll do it and upload the executable Prohibited.
Squall, my compiler accepts the program just as I wrote it, and even in my C++ classes, we're being taught hte way I just displayed...
|
|