a simple 'fusion' engine
Hi, I was wondering as a noob whether you guys could give me some quick help on this one. Today on TV I saw that fusion power is soon to become a reality. I was wondering how I could program my computer to produce the electrical fields required to successfully contain reacting atoms in a fusion process, preferably using my harddrive motor and a box of hairpins. I''m also quite sure that I''ll need to use pointers somewhere along the way, so is anyone able to mail me a short thesis on it to the UK, I don''t like reading off the screen for too long, it hurts my eye-peepers. If anyone is able to tell me what other basic programming components I would need, produce the required code, and tell me why I should want such a device as a cold fusion reactor inside my computer, a reply would be most appreciated.
P.S. can anyone send me a link to creating a class in c++, I can''t seem to find any on the net.
I think you should look at
http://www.macromedia.com/software/coldfusion/
They have a cross-platform cold fusion solution in a box already.
http://www.macromedia.com/software/coldfusion/
They have a cross-platform cold fusion solution in a box already.
Hahaha. Good one
Creating a class in C++? I can''t think of any specific links off the top of my head, but it isn''t too difficult. First you start with a declaration of the class like so
These declarations are typically placed in a header file since any source that needs to use the class requires the class'' declaration so that the compiler knows what the members are and such.
Then in a source file you can define the methods
There, thats the basic way to do it. Then when you need to use this class in code you simply use MyClass as the type for your variable. Like this
It does of course get more complicated than this, but atleast this can get you started.
-out
Creating a class in C++? I can''t think of any specific links off the top of my head, but it isn''t too difficult. First you start with a declaration of the class like so
class MyClass{public: // Public members go here, like say your constructor MyClass(); // constructor ~MyClass(); // destructor // Some public functions void setMyInt(int i); int getMyInt();private: // private members now int myInt;};
These declarations are typically placed in a header file since any source that needs to use the class requires the class'' declaration so that the compiler knows what the members are and such.
Then in a source file you can define the methods
#include "MyClass.h" // doesn''t necessarily have to be in a header file// constructorMyClass::MyClass(){ myInt = 0;}// destructorMyClass::~MyClass(){ // nothing to do in this particular example}void MyClass::setMyInt(int i){ myInt = i;}int MyClass::getMyInt(){ return i;}
There, thats the basic way to do it. Then when you need to use this class in code you simply use MyClass as the type for your variable. Like this
#include "MyClass.h"//...void foo(){ MyClass mc; // constructor on mc called here mc.setMyInt(100); cout << mc.getMyInt() << endl; // prints "100" ofcourse} // destructor on mc called here
It does of course get more complicated than this, but atleast this can get you started.
-out
quote:Original post by bobster
I was wondering how I could program my computer to produce the electrical fields required to successfully contain reacting atoms in a fusion process, etc etc etc
Are you suggesting some code that actually produces physical electrical fields?
... am I missing something?
It’s not cruelty if you inject enough amphetamines…
*sniff sniff* I smell excriment from a bovine.. its fairly strong. Are we downwind from any fields or anything? This STANKS!
heh
heh
quote:Original post by Tookoquote:Original post by bobster
I was wondering how I could program my computer to produce the electrical fields required to successfully contain reacting atoms in a fusion process, etc etc etc
Are you suggesting some code that actually produces physical electrical fields?
... am I missing something?
It’s not cruelty if you inject enough amphetamines…
Technicly code does that anyway, by producing electricin circuits of high and low voltages, that we know as 0 and 1.
But thats technicly. Maybe you could hook up a transformaer to a USB port, and write a program to send alternating current through it, which will get increased by the transformer to something like 10,000 volts. Is that enough for your needs? You would have to wire your own fusion equipment up, but in theory the computer might generate the power...
Oh and for the class question, you might want to buy a C++ book that offers lots of detail of classes, inheritence, polymorphism, OOP design. C++ in 21 days is good for beginners!
-J
You could always try
std::generateelectricfield();
std::createfusionpower();
or even the more powerful function of std::wakeupdreamer();
std::generateelectricfield();
std::createfusionpower();
or even the more powerful function of std::wakeupdreamer();
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement