218 Posted Topics
Re: I've heard of Ruby. It's an object-oriented language, and there's a GNU compiler/interpreter (don't know which) for it. That's all I know about it. | |
Re: Ugh, please don't cross-post: [url]http://daniweb.com/techtalkforums/thread36262.html[/url]. | |
Re: Whatever the Fortran equivalent of [inlinecode]system()[/inlinecode] is. :) This is the C/C++ forum, not Fortran. | |
Re: [quote]I am working under cygwin in WindowsXP. [/quote] I hope [s]he has [b]sed[/b]. :) | |
Re: You shouldn't use <iostream[b].h[/b]>, and you should use indentation. [code]Sibling Siblingperator >( int *array, int arraysize)[/code] I think you're missing a few characters there. [code]} [color=red]>()[/color] return 0; }[/code] Eh? What's that? [edit] Cross-post: [url]http://daniweb.com/techtalkforums/showthread.php?p=178088[/url] [/edit] | |
Re: [quote]Does template code need to be linked dynamically?[/quote] No. | |
Re: You have a stray [inlinecode]#endif[/inlinecode] in your header file. Perhaps you meant to add this onto the beginning: [code]#ifndef HEADER_H #define HEADER_H 1 [/code] [code]ad/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../crt1.o(.text+0x18): In function `_start': : undefined reference to `main'[/code] Well, there you go. main() isn't defined. | |
Re: You just want to move source code from one file to another? | |
Re: [code]bool Card::operator== (const Card &rhs) { return ((Card::suit == rhs.suit) && (Card::rank == rhs.rank)); }[/code] Make up your mind . . . is [b]Card::suit[/b] static or not? And the same with [b]rank[/b]. :) | |
Re: That's good, but why does [b]a[/b] have 10 elements? :) And [b]m[/b] isn't used, etc. | |
Re: [quote]why not to declare functions inside main??? it is not a prob as far as i know , i have made a quite a few prog doing the same [/quote] You're right, you can put function prototypes in a block. But then they're only visible to the end of the … | |
Re: And don't forget [inlinecode]free()[/inlinecode], which I'm sure is mentioned in the tutorial. | |
Re: [list=1] [*]Don't use <iostream.h>. You should use this with the new standard: [code]#include <iostream> using namespace std;[/code] [*]Ditto with getch(). It's non-standard. [*]main() returns [b]int[/b]. And it should also [inlinecode]return 0;[/inlinecode] while you're at it. [*]Don't rely on variables declared in for loops ([inlinecode]for(int x = 0; ...[/inlinecode]) to be … | |
Re: Use [b][co[i][/i]de][/co[i][/i]de][/b] tags around your code. Note: this code [code] cout<<"Error opening input file"<< inputfilename; cout<<"press enter or return to continue...."<<endl;[/code] if executed, would look like this: [code]Error opening input fileinput.txtpress enter or return to continue....[/code] | |
Re: [list=1] [*]Don't use gets(). It's dangerous. (Buffer overruns.) [*]In C++, <stdio.h> becomes <cstdio>. [*]<conio.h> is non-standard. You're not using it anywhere. [*]<iostream.h> is also deprecated. Use [code]#include <iostream> using namespace std; [/code] instead. [/list] |
The End.