Sponsored Content
Top Forums Programming Writing C++ class and member functions Post 302637623 by kristinu on Wednesday 9th of May 2012 05:07:00 AM
Old 05-09-2012
I have a member function called mdacc (look at the green variable) , and in the setter function I am using mdacc for the input argument. And in the program, the user specifies mdacc as well, that then sets the class value for mdacc.

I used to have the class member starting with capital letter, whereas all the others are lower case. But left me with some confusion . What do people code in such cases?

Code:
class ModMisfit {

protected:

  Real    mdacc;

public:

  void  set_mdacc(
      const Real  mdacc);

};

 

10 More Discussions You Might Find Interesting

1. Programming

writing functions

I have to write a program in C++ using several functions. The program consists of ticket sales how many if you are an adult, junior, or toddler and if there are any discounts. I have the program working up to the pricing function. when i put the discount in the equation it <strike>do</strike>... (1 Reply)
Discussion started by: ravenswind35
1 Replies

2. Programming

Handling a signal with a class member function

Hello, i am using the sigaction function to handle the SIGCHLD signal.Is it possible to use a class member function as the handler function (the sa_handler member of the sigaction structure)? The function's signature is: void (*sa_handler)(int);so i don't think i can use a static member function... (2 Replies)
Discussion started by: Zipi
2 Replies

3. UNIX for Dummies Questions & Answers

car class (not school class)

im just trying to have some fun and kill some time writing a c++ program that has a person type in a car make and model then gives them a year and a price. or something like that. i always have problems getting it goin but once the ball is rolling im usually pretty good. anyone wanna help me out? ... (1 Reply)
Discussion started by: rickym2626
1 Replies

4. Programming

C++ class definition with a member of the same class

Hi, i have a question about C++. Is it possible to declare a class with a member ot the same class? For example, a linked list or i want to convert this C code to C++ class (Elemento) typedef struct elemento { char name; char value; List<struct elemento> ltElementos; ... (7 Replies)
Discussion started by: pogdorica
7 Replies

5. Programming

static use for class inside the same class c++

Hi, I believe the next code is wrong: class Egg { Egg e; int i; Egg(int ii=0) : i(ii) {} }; because you would end up with an endless definition (memory allocation) of Egg objects, thus int i. Ok, so God Eckel proposes for a singleton: class Egg { static Egg e; int... (5 Replies)
Discussion started by: xavipoes
5 Replies

6. Shell Programming and Scripting

How to execute functions or initiate functions as command line parameters for below requirement?

I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line if then... (8 Replies)
Discussion started by: saku
8 Replies

7. UNIX for Advanced & Expert Users

Get pointer for existing device class (struct class) in Linux kernel module

Hi all! I am trying to register a device in an existing device class, but I am having trouble getting the pointer to an existing class. I can create a class in a module, get the pointer to it and then use it to register the device with: *cl = class_create(THIS_MODULE, className);... (0 Replies)
Discussion started by: hdaniel@ualg.pt
0 Replies

8. Programming

Size of Derived class, upon virtual base class inheritance

I have the two class definition as follows. class A { public: int a; }; class B : virtual public A{ }; The size of class A is shown as 4, and size of class B is shown as 16. Why is this effect ?. (2 Replies)
Discussion started by: techmonk
2 Replies

9. Programming

Restricting member of a class non-inheritable in C++

There is base class B, and two derived classes D1 and D2 derived from Base. Base class B, have two data members ( public or protected or private or if any). D1 should inherit both these data members, and D2 should be deriving only one member from Base class. Is this kind of design possible without... (1 Reply)
Discussion started by: techmonk
1 Replies

10. Programming

C++ : Base class member function not accessible from derived class

Hello All, I am a learner in C++. I was testing my inheritance knowledge with following piece of code. #include <iostream> using namespace std; class base { public : void display() { cout << "In base display()" << endl; } void display(int k) {... (2 Replies)
Discussion started by: anand.shah
2 Replies
class_delete(3) 					     Library Functions Manual						   class_delete(3)

NAME
class_delete - Return database configuration information. LIBRARY
Standard C Library (libclass.a) SYNOPSIS
#include <apar_types.h> #include <sys/class.h> class_delete (class_apar_handle_t, handle char class_name, int type, int member); PARAMETERS
The partition descriptor returned by class_open(). Name of the class from which the member is to be deleted Member type as defined in <sys/class.h> such as CL_TYPE_UID. Identifier representing type. DESCRIPTION
Remove a member from an existing class. Note that the calling process must have root access privileges. RETURN VALUES
The operation successfully completed. An invalid partition handle was specified. the class_name is not an ASCII string. The class_name does not exist. The member was not found in any class. A member of type type was found in a class other than class_name. SEE ALSO
Functions:class_add(3), class_init(3), class_create(3), class_close(3), class_change(3), class_configure(3), class_get_config_stats(3), class_destroy(3), class_disable(3), class_enable(3), class_save_database(3), class_restore_database(3), class_load_database(3), class_change_name(3), class_database_file_exists(3), class_database_name(3), class_database_modified(3), class_get_classes(3), class_get_class_members(3), Commands:class_admin(8), runclass(1), class_scheduling(4) Other: The System Administration guide. delim off class_delete(3)
All times are GMT -4. The time now is 01:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy