473,378 Members | 1,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

object oriented programing

6
there is my code can anyone tell how to display student with given attributes.
Expand|Select|Wrap|Line Numbers
  1. class student
  2. {
  3.       private:
  4.               int roll_no ;
  5.               char name[30];
  6.               char phone_no[15];
  7.               int batch;
  8.      public:                 }
  9.             Display_Student(int,char,char,int)
  10.             {
  11.                               }
  12.             Search_Student();
  13.            {                       
  14.                         }
  15.             };
Oct 27 '13 #1

✓ answered by Nepomuk

Hi hiba and welcome to bytes.com!

What I would do is create a print_student method which is either part of the student class or takes a student object as a parameter. This method will then output the values of those private fields using cout or printf, your choice.

1 1357
Nepomuk
3,112 Expert 2GB
Hi hiba and welcome to bytes.com!

What I would do is create a print_student method which is either part of the student class or takes a student object as a parameter. This method will then output the values of those private fields using cout or printf, your choice.
Oct 27 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Benjamin C. Pierce | last post by:
The Twelth International Workshop on Foundations of Object-Oriented Languges (FOOL 12) Saturday 15 January 2005 Long Beach, California, USA Following POPL 05 The search for sound principles...
5
by: Martin | last post by:
When was inheritance intruduced into object oriented programming? More generally, does anyone know or have any sources on when the different features were introduced into object oriented...
34
by: yensao | last post by:
Hi, I have a hard time to understand difference and similarities between Relational database model and the Object-Oriented model. Can somebody help me with this? Thank you in advance. ...
65
by: Roger Smythe | last post by:
A means for the progressive decomposition a problem space into increasingly simpler component parts such that these component parts represent higher levels of conceptual abstraction, and are...
1
by: m++ | last post by:
Hi there, I am looking for some C++(object oriented) source codes of applications designed for embedded systems. I am going to use them as benchmarks. I've faced with some of these applications in...
14
by: Rookie | last post by:
Is C an object oriented programming language?
8
by: cppig1995 | last post by:
C++ is not only object-oriented language. I think the description of this group have to be changed. :-) Have fun! ---- cppig1995 (cppig1995@gmail.com) Daejeon Metropolitan City, Republic of...
47
by: Thierry Chappuis | last post by:
Hi, I'm interested in techniques used to program in an object-oriented way using the C ANSI language. I'm studying the GObject library and Laurent Deniau's OOPC framework published on his web...
46
by: ajba74 | last post by:
Hi fellows, I am reading some books to learn the C programming language, and sometimes I have the feeling that when somebody becomes a C expert, he must learn a more modern and object-oriented...
3
by: notnorwegian | last post by:
i have some confusion over this. sure a class is basically a classification, like for example an animal or flower. and an object/instance of that class is then for example a cat. an object is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.