Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

sevak

Exercise

This topic is 5527 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have to complete this exercise in the book im reading but for some reason the code I use doesn''t work. Exercise:A serial transmission line can transmit 960 characters a second. Write a program that will caculate how long it will take to send a file, given the file''s size. Try it on a 400MB(419,430,400 byte) file. Use appropriate units. (A 400MB file takes days) Here is my code #include <iostream> #include <stdlib.h> int main() { double bytes = 0; double hours = 0; cout << "Enter number of Bytes: "; cin >> bytes; hours = bytes/57600; cout << "It will take about " << hours << " hours" <

Share this post


Link to post
Share on other sites
Advertisement
o ya your right I forgot about that. O and Brian whats numspace got to do with this?

Share this post


Link to post
Share on other sites
Right, you either have to say where the cout and cin methods are coming from explicitely (std::cout, std::cin) or you have to tell the compiler that you''re using the std namespace:

using namespace std;

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!