Sponsored Content
Full Discussion: Use of C++ Classes
Top Forums Programming Use of C++ Classes Post 302389611 by kristinu on Monday 25th of January 2010 10:46:46 AM
Old 01-25-2010
Oh yes, cannot define before the class as they are class members. But can define them before the member functions as you say.

I have the ifdef's to prevent modmisfit.h being multiply included. Has not included everything as it was quite long class.

Thanks for your help
 

10 More Discussions You Might Find Interesting

1. Programming

how to use classes in c ?!?!?

Hi, I've tried to use classes in my program, but the compiler simply gives an error on the word class . Am I the only one with this problem ? I have no idea how to use classes in c in linux environment(suse). If you've got any idea what should I do I would be very thankful. Thanks to ya all !... (4 Replies)
Discussion started by: atticus
4 Replies

2. UNIX for Advanced & Expert Users

Grep character classes '\w' '\d'

I am learning regex fundamentals on my own and when I try to use \w for characters (i.e. ), or \d for digits () it doesnt work even though I see in greps man page that \w should be the same as ]... ] and those types of syntactic character classes do work for me, its just the shorthand \w \W and... (4 Replies)
Discussion started by: glev2005
4 Replies

3. Programming

Separating two classes in two files

I have a file Map.hh shown below. I want to put the two classes Phase and Map in two different files Phase.hh and Map.hh. I have forward declaration before the Map class. How can I tackle this situation? ////////////////////////////////////////////////////////////////////////// #ifndef... (3 Replies)
Discussion started by: kristinu
3 Replies

4. Programming

c++ help with class(new to classes)

Hello there, I am new to using classes, and have been having so many problems. I don't want to go to my teacher if I don't have to, because it is always my luck that it is something easy that I just overlooked somehow. I have been working on this for 3 days and I can't get it to read from a file. ... (1 Reply)
Discussion started by: KingAroan
1 Replies

5. Programming

Writing C++ program Arguments and Classes

I want to write a C++ program that uses a class to do some calculations. I pass arguments to the program, some of which are used to set up class members. A class function will then perform the necessary calculations. I am wondering how I should pass the arguments from the program to set the... (2 Replies)
Discussion started by: kristinu
2 Replies

6. Shell Programming and Scripting

Need help separating file lines into three classes

Hi folks, What I have are config files with lines that: are blank, start with a "!" or start with char's(or a blank space and then char's) I am using ksh I can display each line by doing: for INDEX in {0..$LENGTH} do echo "${data}" done What I need to do requires I can... (12 Replies)
Discussion started by: Marc G
12 Replies

7. Programming

OOP in FORTRAN derived classes

I am using an extended class to describe a point in 2-D The following is my program, after that the definition of the classes I am getting the following error gfortran gshapes.f08 gshapes_utest.f08 -o gshapes_utest.x gshapes_utest.f08:53.27: call ellips%set_ellipse (crnr1, crnr2) ... (0 Replies)
Discussion started by: kristinu
0 Replies

8. Programming

Set java classes path

I add some new java jar files in the old project, how can I edit the class path? How can I compile all the java classes by just type 'C':o (3 Replies)
Discussion started by: Hscript
3 Replies

9. Programming

Java Abstract Classes

Can anyone tell me if this is correct when creating classes in Java? public abstract class Animal { public class Point { public int x,y; } public class Animal { protected Point loc; protected String name; protected Random rng; String... (3 Replies)
Discussion started by: totoro125
3 Replies

10. Shell Programming and Scripting

Equivalence classes don't work

Hello: I can't get equivalence classes to work in globs or when passing them to tr. If I understood correctly, matches e, é, è, ê, etc. But when using them with utilities like tr they don't work. Here's an example found in the POSIX standard: I decided to create the aforementioned files in... (9 Replies)
Discussion started by: Cacializ
9 Replies
XGetVisualInfo(3X11)						     MIT X11R4						      XGetVisualInfo(3X11)

Name
       XGetVisualInfo, XMatchVisualInfo, XVisualIDFromVisual, XVisualInfo - obtain visual information and visual structure

Syntax
       XVisualInfo *XGetVisualInfo(display, vinfo_mask, vinfo_template, nitems_return)
	  Display *display;
	  long vinfo_mask;
	  XVisualInfo *vinfo_template;
	  int *nitems_return;

       Status XMatchVisualInfo(display, screen, depth, class, vinfo_return)
	  Display *display;
	  int screen;
	  int depth;
	  int class;
	  XVisualInfo *vinfo_return;

       VisualID XVisualIDFromVisual(visual)
	   Visual *visual;

Arguments
       class	 Specifies the class of the screen.

       depth	 Specifies the depth of the screen.

       display	 Specifies the connection to the X server.

       nitems_return
		 Returns the number of matching visual structures.

       screen	 Specifies the screen.

       visual	 Specifies the visual type.

       vinfo_mask
		 Specifies the visual mask value.

       vinfo_return
		 Returns the matched visual information.

       vinfo_template
		 Specifies the visual attributes that are to be used in matching the visual structures.

Description
       The function returns a list of visual structures that match the attributes specified by vinfo_template.	If no visual structures match the
       template using the specified vinfo_mask, returns a NULL.  To free the data returned by this function, use

       The function returns the visual information for a visual that matches the specified depth and class for a screen.  Because multiple visuals
       that match the specified depth and class can exist, the exact visual chosen is undefined.  If a visual is found, returns nonzero and the
       information on the visual to vinfo_return.  Otherwise, when a visual is not found, returns zero.

       The function returns the visual ID for the specified visual type.

Structures
       The structure contains:

       /* Visual information mask bits */

       #define				     0x0
       #define				     0x1
       #define				     0x2

       #define				     0x4
       #define				     0x8
       #define				     0x10
       #define				     0x20
       #define				     0x40
       #define				     0x80
       #define				     0x100
       #define				     0x1FF

       /* Values */

       typedef struct {
	 Visual *visual;
	 VisualID visualid;
	 int screen;
	 unsigned int depth;
	 int class;
	 unsigned long red_mask;
	 unsigned long green_mask;
	 unsigned long blue_mask;
	 int colormap_size;
	 int bits_per_rgb;
       } XVisualInfo;

See Also
       XFree(3X11)
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

															      XGetVisualInfo(3X11)
All times are GMT -4. The time now is 10:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy