Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

what kind of function is thiS?

Posted on 1997-04-06
2
186 Views
Last Modified: 2010-04-10
hi there,
        I am doing a project on creating a simple database (storing particulars of friends) using C++. The user is suppose to key in the required data and the program is to search for the data in the external file and display it on the screen for the user and therefore the user can edit or just view the data he/she wants. Searching for the data in the external file is something which i cannot do since the examples given by our prof is not sufficient and so are the books I borrow from the library school.

And so what kind of function in C++ can it search for the required data (the file is suppose fill with alot of data ) and display it on the screen.
It will be a great help if it is in source code
0
Comment
Question by:ftyk
2 Comments
 
LVL 5

Accepted Solution

by:
yonat earned 50 total points
ID: 1162603
You can read using an fistream. For example:

#include <fstream.h>

char line[MAX_LINE_LEN];
fstream f("bla.txt");
f >> line;
// do stuff with it.
f.close();

The way to display text on screnn depends on the operating
system.
If you just want text I/O, you can use cout:

#include <iostream.h>

cout << "some text";

0
 

Author Comment

by:ftyk
ID: 1162604
Edited text of question
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Building cUrl in Windows v7.43.0 4 36
Header of docx file 17 115
Issues with C++ Class 19 101
learn programming 8 38
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question