Questions tagged [member]

A member is an element of an object in the object-oriented programming paradigm.

A member is an element of an object in the object-oriented programming paradigm. Member variables are often called fields, while member functions are also called methods.

1754 questions
0
votes
1 answer

No members available for object declared as a class variable

I'm having a little bit of a hard time explaning the problem, so here's a simple rundown of my code: Imagine I have a class called 'character' #include "myEnums" #include "weapon" character { protected: string characterName; weapon*…
RaenirSalazar
  • 556
  • 1
  • 7
  • 20
0
votes
1 answer

Should I keep Application subclass object as a member or local variable?

I was wondering, I am using Application subclass to access some global data inside Activities. And I was wondering what would be better in terms off performance and memory. Is it better to assign application object to field variable in onCreate and…
urSus
  • 12,492
  • 12
  • 69
  • 89
0
votes
1 answer

Can Private data members accessed using Public Pointer to it in C++?

How to access id using ptr? class A { int id; public: int *ptr; }; void main() { int A::* ptr = &A :: id; getch(); }
Chaitanya Babar
  • 269
  • 3
  • 12
0
votes
1 answer

Property of List of T object

In Visual Basic.net, If I have a List of T, where the Type is an object that always has a .Name property, how I can write a function that returns the .Name value? Here is my code: Public Function GetListOfListItemNames(Of T)(ListOfItems As List(Of…
Simon
  • 351
  • 3
  • 8
  • 16
0
votes
1 answer

I need a type in C++ that is literally a member, as opposed to a nested type

I need something that will work with the following: struct thing *s; printf("the size of %s is %d", s->type, (int) sizeof(s->type)); I thought I had at last found a solution with typedef, but no: struct thing { typedef int type; } expects syntax…
Elliot Way
  • 243
  • 1
  • 9
0
votes
1 answer

Member function in sml with foldl

I found this member function on the Internet which uses foldl fun memeber3 (x,xs)= foldl (fn (y,b)=>b orelse x=y) false; but when I run it with an element and a list it does not work, instead of true or false it reacts like I am…
Alexis S.
  • 5
  • 5
0
votes
1 answer

C++ Static Declaration

I am trying to declare a static variable in console.h and define it in console.cpp. the line calling the variable is: ok = CheckIoEditMinMax(0,Console::_tabsize, curpos, 0, insert, 20-Console::_tabsize,20, offset) && ok; I have know…
Saulius
  • 21
  • 1
  • 9
0
votes
1 answer

Accessing a member function from a vector of pointers? C++

So, lets say I have a vector, vector vItem and an Item class with a member function Item::setValue();. Lets also say I populated that vector by using vItem.push_back(new Item). Now, to access that member function, through the pointer in the…
Nick
  • 25
  • 3
0
votes
1 answer

Struct Definition on Include Not Recognized

It must be the way my professor declared the typedefs, because I haven't run into this problem yet. I have the following (piece) of a header file, and the accompanying code that uses it: polynomial.h - #ifndef POLYNOMIAL_H_ #define…
Chris Cirefice
  • 5,475
  • 7
  • 45
  • 75
0
votes
1 answer

How to use a function list to point to member function in a vector object?

struct object { void function() { std::cout << "function" << std::endl; } }; int main() { // create vectors for objects and functions) std::vector objectvec; std::vector functionlist; …
0
votes
1 answer

Member Function Error

class recording { public: void setTitle(const string &); void setArtist(const string &); string getTitle(void) const; string getArtist(void) const; private: string title; string artist; }; void recording::setTitle(string…
0
votes
4 answers

C# Private member shared by all class instances

I am currently working with C# using the Unity3D engine and have come upon the following problem: I created a class that has two private references to instances of another class which it has to access. Once I create multiple instances of the class…
Valtaroth
  • 65
  • 6
0
votes
2 answers

non-class type Error

#define MAXLINELENGTH 8192 struct Image { unsigned int height; unsigned int width; unsigned int value; unsigned int maxValue; unsigned int data[MAXLINELENGTH]; }; Image *Image_Init () { Image *tmpImage; unsigned int…
0
votes
1 answer

Filter Dimension Members that don't have any Measure Values

I have a straight up question about the SSAS Is it possible to filter out Dimension Members that have no Values in Measures? Thanks in advance
gberisha
  • 291
  • 5
  • 17
0
votes
1 answer

C++ Member Variables not Updating - Noob here

I've lurked and browsed for a while around here already, but this is my first time posting. Hope I've got the rules and format down pat. I'm been coding for several months now, so still pretty new at this. Right now, I'm trying to implement a very…
D_S_B
  • 208
  • 3
  • 9
1 2 3
99
100