|
To be honest, No. I have seen them work but to execute them is another story. I am trying to finish this program so i can move forward with the rest of my studies. I love this type a work so that i cam go on to making web pages and games and all types of stuff. But i can't get pass this!!!Just really frustrated!!
|
|
|
|
|
Hmm... to be honest, or polite ? I'll go with honest.
Jodieluv wrote:
I love this type a work so that i cam go on to making web pages and games and all types of stuff. But i can't get pass this!!!Just really frustrated!!
Sadly, the world is full of people who want to 'make web pages and games and stuff'. If you don't have the ability to crack a book and learn what a header file is, then there is frankly no hope for you. Learn some HTML and some Flash and you should be able to create some pretty pages with pictures of your cat and stuff, or prepare yourself to work a lot harder than you seem willing to work now. You shouldn't be looking at a project like the one you posted if you don't even know what a C++ project looks like. The web is definately full of information, not least on this site, to get you started in C++. I suggest you google a little and then post here again when you've had a shot at this and need some help from there. The one skill you need to be a coder is not to be really smart, or to know a lot of stuff, it's to know how to find information when you need it. That includes asking in places like this, but not as a first port of call, that's asking other people to do the work for you.
You may also consider buying a book like Teach yourself C++ in 24 hours, or C++ for dummies ( that's not an insult, it's just that those books move nice and slow. I started with 'C++ in 24 hours' myself. Just don't buy 'teach yourself Visual C++ in 24 hours, that's an MFC book that assumes you can code in C++ ).
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
thanks alot, to you all, (even though i know that you all hav been down that road. Just feel better to know that i was not the only one!!!1
|
|
|
|
|
|
I remember doing this in a physics class in college. You say you wanna program games and all. I wish you luck my friend. Try reading about the stuff first off like in here, or use google. or here do this. go to this link.
http://www.sudhirmangla.netfirms.com/books/visual_c++.htm
it has tons of books on visual c++ and even books on c and c++. if you don't know classes in c++ i hate to say it but your gonna have a tuff ride. C++ is just that C with classes.
The folks here will gladly help you for they have helped me, however even if you find someone to do your homework for you your missing the whole point of the exercise. You might get the grade and move on, but when you get that piece of paper that says you are a B.S. in Computer Science and then you go and get a job doing the stuff they are gonna say just that B.S. cause your not gonna know jack.
I say this is homework cause I have a printout of this very similar that i had to do for my physics class.
Win32newb
if (user=="Win32newb")
{
CWnd::Messagebox
("DUH");
}
"Making windows programs worse than they already are"
|
|
|
|
|
I am need of some help, I am new at c + + and want to design this program. I am using C++ programming today by Barbara Johnson and not getting any where!!!!
Objective: Write a program that uses a class to perform tasks.
Write a program that calculates and displays the electrical current flowing through a circuit, the voltage across each resistor, and power dissipated by each of two resistors in a simple series circuit. The series circuit consists of a single voltage source with two resistors in series across the voltage source outputs.
Use a class to hold the two resistor values and the voltage. The class should also have functions to calculate the current flowing through the series circuit (voltage/ (resistorA+resistorB)), the voltage drop across each resistor (two functions), and the power dissipated by each resistor (two functions). There are five functions in total. Each of these functions returns a double.
The voltage drop across resistor1 is (resistor1 * voltage)/(resistor1 + resistor2). The voltage drop across resistor2 is (resistor2 * voltage)/(resistor1 + resistor2).
Power can be calculated by squaring the voltage drop across the resistor and dividing this by the resistance. The function that returns the voltage can be used to get the voltage as shown below:
powerR1 = VoltageR1 ()*VoltageR1 ()/resistor1;
VoltageR1() is the class function that returns the voltage drop across resistor 1 and resistor1 is the value of resistor 1.
The program should execute in a loop. Inside the loop ask the user to enter the source voltage. Read the value entered and assign it to an appropriately named member of the class. Next prompt the user to enter a value for the first resistor. Assign this value to an appropriately named member of the class. Next prompt the user to enter a value for the second resistor and assign this value to an appropriately named member of the class. After the values are entered, prompt the user to enter either V, P or C. If a V is entered display the voltages across each of the resistors, if a P is entered display the power dissipated by each of the resistors, and if a C is entered display the current through the circuit. Letters can be either lower or upper case.
After the above information is displayed prompt the program user to enter y to continue with new values and another calculation.
Put the declaration/definition for the class in a header file. Be sure to save the file in the project folder and add the header file to project. Put the class functions/methods in another .cpp file and add this to the project. Put the code with a main that makes an instance of the class in another .cpp file and make sure that is in project.
jodie
|
|
|
|
|
I am working on a program that controls the behavior of Windows Media Player - pause, play, play next, etc. and read the information of the media library. I searched the Media Player SDK for help but failed to find any useful information.
Does anyone know how to do this?
|
|
|
|
|
|
I am new to program (c++)and I am having a hard time writing the code for this example. I am useing microsoft visual c++. This is a example of my problem and how do I start this project.
Write a program that calculates and displays the electrical current flowing through the circuit, the voltage across each resistor, and power dissipated by each of two resistors in a simple series circuit. The series circuit consists of a single voltage source with two resistors in series across the voltage source outputs.
The program should execute in a loop. Inside the loop ask the user to enter the source voltage. Read the value entered and assign it to an appropriately named member of a structure. Next prompt the user to enter a value for the first resistor. Assign this value to an appropriately named member of a structure. Next prompt the user to enter a value for the second resistor and assign this value to an appropriately named member of a structure. After the values are entered, display the current flowing through the series circuit (voltage/(resistorA+resistorB)), the voltage drop across each resistor, and the power dissipated by each resistor. The voltage drop across resistorA is (resistorA * voltage)/(resistorA + resistorB). The voltage drop across resistorB is (resistorB * voltage)/(resistorA + resistorB). Power can be calculated by multiplying the voltage drop across a resistor value times the current through it.
After the above information is displayed prompt the program user to enter either a Y or N. If the user enters a Y, the program should continue to loop and go through the entire cycle asking for voltage source and resistor values, performing the calculations and outputting the current, voltage drops, and power dissipated by the resistors.
Put the definition for the structure in a header file (File-New File-Header File(.h). Be sure to save the file in the project folder and add the header file to project. Use the #include “filename.h” at the top of you C++ program to attach the header file to project.
|
|
|
|
|
I'll do your homework for you. My rate is $200 an hour.
Or you could give it a go, post your code here, and I'll be glad to help you.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Christian Graus wrote:
I'll do your homework for you. My rate is $200 an hour.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Use the App Wizard to create a Console Application.
Create variables - double Vs, Is, V1, V2, P1, P2, R1, R2; initialize Vs=0, Is=0, R1 and R2 something > 0 (to prevent ugly errors).
Create a variable - char Q.
Create a loop control; int Go = 1, perhaps.
Open a While(Go) loop.
Inside the loop, request values for Vs, R1, and R2 from the console.
Is= Vs/(R1 + R2);
V1= R1 * Is;
V2= R2 * Is;
P1= V1 * V1 / R1;
P2= V2 * V2 / R2;
Display the values and wait for a response of Y or N into the variable Q.
If (Q == 'Y')
Go = 1;
else
Go = 0;
Implementation details are left as an exercise for the student.
Will Build Nuclear Missile For Food - No Target Too Small
|
|
|
|
|
Roger Wright wrote:
Implementation details are left as an exercise for the student.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
I've always wanted to say that, I heard it so often in college. Now that I'm a college teacher, I can.
Will Build Nuclear Missile For Food - No Target Too Small
|
|
|
|
|
Roger Wright wrote:
I've always wanted to say that
Yeah i know what you mean , never miss a change when you want to do it.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Hello everyone:
How to get system time to micro second?
Thank you.
-Freehawk
|
|
|
|
|
Using QueryPerformanceCounter, see article in recent MSDN magazine:
http://msdn.microsoft.com/msdnmag/issues/04/03/HighResolutionTimer/default.aspx
Edward
|
|
|
|
|
Thank you very much for the fast reply.
-Freehawk
|
|
|
|
|
Hello everyone, i was wondering how to copy from one string to another.
for example.
I am reading a line from a file, lets say
1234 Jack
I want to parse the 1234 to temp and Jack to temp2
between 1234 and Jack is a space.
I have tried using the find and the replace function of string, but have not succeded, if anyone could help me out, it
none
|
|
|
|
|
Perhaps you could explain what the problem is and show us your code ? You want to find the index of the space, and then create two new strings, from memory CString has Left(), Mid() and Right() functions to do that.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Well here is what i am trying to do..
As you can see, i am reading from a file and putting it into buff. At first run of the look buff has
1234 Jack
what i want to do is put 1234 into temp and Jack into temp2.
CString temp,temp2
temp = "";
temp2 = "";
while( !m_sfile.eof() ) {
m_sfile.getline( buff, 256 );
}
none
|
|
|
|
|
Try this instead:
std::string name;
int number;
while( !m_sfile.eof() )
{
m_sFile >> number;
m_sFile >> name;
}
This will do it. Plus it does not taint the standard library with CString. It's much neater than string mashing.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I does not work, i get an error.
C:\TIME TRACKER\TimeTracker\TimeTrackerDlg.cpp(283) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >' (or there is no a
none
|
|
|
|
|
The std::string cannot be read from stream via >> , because the stream doesn't know, where should be the end of the string. std::istream haven't any parse capabilities (except of simple getline , that isn't useful in your case).
Try Tokenizer class at Codeproject.
Robert-Antonio
"Science is a differerntial equation.
Religion is a boundary condition."
|
|
|
|
|
Hello,
I am not to experienced with VC++. I would like to write a program that is pretty large. (at least for me) I am having trouble with getting all my ideas on paper or in a plan of something. Any suggestions on a possible (free?) program that I can use to plan a project?
Slaru
|
|
|
|