Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×
Programming

Journal Journal: Forward Declarations Tips for C++

I was recenlty on a Forward Declarations frenzy in C++, and I was having a little trouble. I recently bought a subscription to SuperNews so I could check comp.std.c++, comp.lang.c++.moderated, and other programming related newsgroups. That subscription definitely paid off because a few days later it helped point out why I was having some errors in my code. Here is an edited copy of the thread I found titled "Forward Declaration" (Subscription Required) in comp.std.c++:

---------------------------------------

>1) class a_class; //forward declaration
> class another_class
> {
> a_class object;
> };

This is not legal. All members must be complete.

> 2) class a_class
> class another_class
> {
> a_class* object
> }

This is perfectly OK.

> 3) class a_class; //forward declaration
> class another_class : public a_class
> {
> };

Again, this is not legal. Base classes must also be complete. -Richard Smith

---------------------------------------

Big thanks to Richard!

JOhn

User Journal

Journal Journal: Thermal Specifications for P4 and Athlon CPUs

All info lists maximum thermal power.

[AMD Athlon XP Processor Model 6]
1500+ (1333 MHz) 60.0 W
1600+ (1400 MHz) 62.8 W
1700+ (1467 MHz) 64.0 W
1800+ (1533 MHz) 66.0 W
1900+ (1600 MHz) 68.0 W
2000+ (1667 MHz) 70.0 W
2100+ (1733 MHz) 72.0 W

[AMD Athlon XP Processor Model 8]
1700+ (1467 MHz) 49.4 W
1800+ (1533 MHz) 51.0 W
1900+ (1600 MHz) 52.5 W
2000+ (1667 MHz) 60.3 W
2100+ (1733 MHz) 62.1 W
2200+ (1800 MHz) 67.9 W

[AMD Athlon XP Processor Model 10]
2500+ (1833 MHz) 68.3 W
2800+ (2083 MHz) 68.3 W (Same in datasheet)
3000+ (2167 MHz) 74.3 W

[Intel® Pentium® 4, 512KB L2 Cache, 0.13u, 2 GHz - 3.06 GHz, support for Hyper-Threading at 3.06 GHz Datasheet]
Processors with VID=1.500V
2.00 GHz 52.4 W
2.20 GHz 55.1 W
2.26 GHz 56.0 W
2.40 GHz 57.8 W
2.50 GHz 59.3 W
2.53 GHz 59.3 W

Processors with VID=1.525V
2.00 GHz 54.3 W
2.20 GHz 57.1 W
2.26 GHz 58.0 W
2.40 GHz 59.8 W
2.50 GHz 61.0 W
2.53 GHz 61.5 W
2.60 GHz 62.6 W
2.66 GHz 66.1 W
2.80 GHz 68.4 W

Processors with multiple VIDs
2.00 GHz 54.3 W
2.20 GHz 57.1 W
2.26 GHz 58.0 W
2.40 GHz 59.8 W
2.50 GHz 61.0 W
2.53 GHz 61.5 W
2.60 GHz 62.6 W
2.66 GHz 66.1 W
2.80 GHz 68.4 W
3.06 GHz 81.8 W

[Intel® Pentium® 4, 423-pin Package, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90 and 2 GHz Datasheet]
1.7V processors
1.30 GHz 48.9 W
1.40 GHz 51.8 W
1.50 GHz 54.7 W

1.75V processors
1.30 GHz 51.6 W
1.40 GHz 54.7 W
1.50 GHz 57.8 W
1.60 GHz 61.0 W
1.70 GHz 64.0 W
1.80 GHz 66.7 W
1.90 GHz 69.2 W
2.00 GHz 71.8 W

Slashdot Top Deals

The solution of problems is the most characteristic and peculiar sort of voluntary thinking. -- William James

Working...