 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue May 22, 2007 9:10 am Post subject: Please solve my problem |
|
|
Pronlem# 1: How can I Create a notepad file named number.txt which
consists of int type numbers separated with new lines on your hard
disk, a program which read the numbers form this file and show them to
screen, also display the total numbers in files and largest and
smallest numbers to the screen. Please guide me I will be very thank
full to you.
problem # 2: Write a simple structure named Students. This structure
consists of three variables Name, GPA and TotalMarks. Now write three
variables of data type Students. Get value from user for these three
students and show them on screen. |
|
| Back to top |
|
 |
Salt_Peter Guest
|
Posted: Tue May 22, 2007 9:10 am Post subject: Re: Please solve my problem |
|
|
On May 22, 3:47 am, Kausar.Na...@gmail.com wrote:
| Quote: | Pronlem# 1: How can I Create a notepad file named number.txt which
consists of int type numbers separated with new lines on your hard
disk, a program which read the numbers form this file and show them to
screen, also display the total numbers in files and largest and
smallest numbers to the screen. Please guide me I will be very thank
full to you.
|
There is no such thing as a notepad file, you mean a plain text file.
You can open Notepad and just create the file using the keyboard.
Reading from that file should be a simple task using a std::fstream
(std file stream).
I'ld suggest a std::vector< int > to store the integers.
| Quote: |
problem # 2: Write a simple structure named Students. This structure
consists of three variables Name, GPA and TotalMarks. Now write three
variables of data type Students. Get value from user for these three
students and show them on screen.
|
That question gets asked a lot here (its Student, not Students). The
funny thing is most that do ask about it at least show an attempt at
creating the type Student. |
|
| Back to top |
|
 |
Alf P. Steinbach Guest
|
Posted: Tue May 22, 2007 9:10 am Post subject: Re: Please solve my problem |
|
|
* Kausar.Nazir (AT) gmail (DOT) com:
| Quote: | Pronlem# 1: How can I Create a notepad file named number.txt which
consists of int type numbers separated with new lines on your hard
disk,
|
That I won't tell you. Lay off my hard-disk.
| Quote: | a program which read the numbers form this file
|
Ditto.
| Quote: | and show them to
screen, also display the total numbers in files and largest and
smallest numbers to the screen. Please guide me I will be very thank
full to you.
|
This sounds like homework.
Read the FAQ's advice about posting homework questions.
| Quote: | problem # 2: Write a simple structure named Students. This structure
consists of three variables Name, GPA and TotalMarks. Now write three
variables of data type Students. Get value from user for these three
students and show them on screen.
|
This sounds like homework.
Read the FAQ's advice about posting homework questions.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|