Search found 14 matches
- Mon Aug 02, 2004 3:40 am
- Forum: C++
- Topic: strange compile error
- Replies: 11
- Views: 4480
zacharyleung - what version of gcc do you have? Do you happen to use any command line switch? Your problem is not with the compiler though, but with linker (ld). Ask your system administrator about it - it seems that gcc is installed inappriopriately. Your TMP environmental variable possibly has a ...
- Sun Aug 01, 2004 9:33 am
- Forum: C++
- Topic: strange compile error
- Replies: 11
- Views: 4480
- Sat Jul 31, 2004 8:57 am
- Forum: C++
- Topic: strange compile error
- Replies: 11
- Views: 4480
strange compile error
This is a really strang error that I get! Any idea what's wrong?
[cpp]
#include <iostream>
int main() {
int i;
cout << "hello" << endl;
cin >> i;
return 0;
}
[/cpp]
leungnga@sf3:~/CS3233[518]$ gcc Test.cc
Undefined first referenced
symbol in file
ostream::operator<<(char const *) /var/tmp ...
[cpp]
#include <iostream>
int main() {
int i;
cout << "hello" << endl;
cin >> i;
return 0;
}
[/cpp]
leungnga@sf3:~/CS3233[518]$ gcc Test.cc
Undefined first referenced
symbol in file
ostream::operator<<(char const *) /var/tmp ...
- Tue May 04, 2004 7:55 am
- Forum: Volume 102 (10200-10299)
- Topic: 10203 - Snow Clearing
- Replies: 21
- Views: 6386
- Tue Apr 20, 2004 9:43 am
- Forum: Volume 102 (10200-10299)
- Topic: 10203 - Snow Clearing
- Replies: 21
- Views: 6386
10203 Snow Clearing
I'm quite sure my code is correct, could anyone tell me what's wrong, cos I keep on getting WA....
[cpp]
#include <cstdio>
#include <cmath>
#include <cstring>
#define DEBUG(var) cout << #var << " = " << var << endl;
#define LINE cout << __LINE__ << endl;
const int MAX_LINE_LEN = 100;
void test ...
[cpp]
#include <cstdio>
#include <cmath>
#include <cstring>
#define DEBUG(var) cout << #var << " = " << var << endl;
#define LINE cout << __LINE__ << endl;
const int MAX_LINE_LEN = 100;
void test ...
- Wed Apr 14, 2004 8:18 am
- Forum: Volume 101 (10100-10199)
- Topic: 10152 - ShellSort
- Replies: 33
- Views: 14750
10152 Shellsort--how do you make this faster?
I've gotten an AC for this question. :D But my solution takes about 6 seconds to run, which is a lot longer than the fastest solutions (about 0.15 seconds) Any suggestions as to how to make this faster?
[cpp]
#include <cstdio>
#include <climits>
#include <cstring>
#define DEBUGI(var) printf( "%s ...
[cpp]
#include <cstdio>
#include <climits>
#include <cstring>
#define DEBUGI(var) printf( "%s ...
- Sat Mar 27, 2004 7:34 am
- Forum: Volume 1 (100-199)
- Topic: 183 - Bit Maps
- Replies: 15
- Views: 6056
Clarification for 183 (Bit Maps)
I was getting stuck on this problem, and I finally figured out why I was getting WA. The reason was that if the bit map contians more than 50 characters, they would like the answer to be something like the following:
D 3 30
DDDDD01D01DD01D01DDD01D01DD010DDD10D10DD10D10DDD10 ...
D 3 30
DDDDD01D01DD01D01DDD01D01DD010DDD10D10DD10D10DDD10 ...
- Sat Mar 20, 2004 10:10 am
- Forum: Other words
- Topic: What exactly is "lexicographical order"?
- Replies: 4
- Views: 2440
What exactly is "lexicographical order"?
There are quite a few questions where we are required to print the lexicographically smallest answer. Is there a good way in general to get this smallest answer? Problems that are like this include 116, 10026...
- Sat Mar 20, 2004 4:28 am
- Forum: Off topic (General chit-chat)
- Topic: Linux question about Ctrl-z
- Replies: 4
- Views: 2899
- Thu Mar 18, 2004 10:38 am
- Forum: Off topic (General chit-chat)
- Topic: Linux question about Ctrl-z
- Replies: 4
- Views: 2899
Linux question about Ctrl-z
Normally when I write programs, I log on using a SSH client to a remote server and I use emacs to write my program. Sometimes I accidentally hit C-z which suspends my currently running application. I can't figure out how to restart it, does anyone know how I can restart my suspended application ...
- Tue Mar 16, 2004 3:24 am
- Forum: C
- Topic: What's the maximum integer in C?
- Replies: 4
- Views: 2927
- Mon Mar 15, 2004 10:28 am
- Forum: C
- Topic: What's the maximum integer in C?
- Replies: 4
- Views: 2927
What's the maximum integer in C?
I believe it's 2^31 - 1. The thing is when I want to write code like the following
min = Integer.MAX_VALUE
for( i = ...)
if( min < value )
min = vale
So what is the maximum value, or where can I find it?
Thanks!
min = Integer.MAX_VALUE
for( i = ...)
if( min < value )
min = vale
So what is the maximum value, or where can I find it?
Thanks!

- Tue Feb 03, 2004 3:28 pm
- Forum: Java
- Topic: [ Java ] Useful methods to save time.
- Replies: 12
- Views: 13519
- Tue Feb 03, 2004 3:53 am
- Forum: Volume 102 (10200-10299)
- Topic: 10205 - Stack 'em Up
- Replies: 60
- Views: 33154
Java input issues... (ref Problem 10205)
This is my first post! :)
Anyway, I know this is a pretty simple problem, but I can't figure out how to read in the input correctly. I'm pretty confident that my algorithm works. Because I can't always read in the input correctly, I'm having problems with a few other problems too. I'd appreciate it ...
Anyway, I know this is a pretty simple problem, but I can't figure out how to read in the input correctly. I'm pretty confident that my algorithm works. Because I can't always read in the input correctly, I'm having problems with a few other problems too. I'd appreciate it ...