- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
10 Posted Topics
Does anyone know where can i get the game engine: LlamaWorks2D ? | |
[B][COLOR="red"]Question: [/COLOR][/B] Can i initialize char arrays using preamble initialization ? [B][COLOR="red"]Code:[/COLOR][/B] [code=c++] #prag... #pragma once class Pizza { public: Pizza (const char top[] = "cheese", const int size = 12, const double pr = 8.99) : strcpy_s (_topping ,top), _diameter (size), _price (pr) {} ~Pizza () {} void setValues … | |
Re: [QUOTE=people123;498056]You should use inline functions when declaring them in the class itself, you can do this by simply typing [inlinecode]void SetAge (int age) [b] { return itsAge = age } [/b] [/inlinecode] so you wouldnt need to use the scope operator later with the [inlinecode]int Cat::[/inlinecode] in front of the … | |
[B]Point.h[/B] [code=c++] #prag... #pragma once #include <iostream> using namespace std; class Point { private: int x; int y; public: Point(void); Point( int x, int y ); Point( const Point &xPoint ); ~Point(void); void setX( int x ); int getX() const; void setY( int y ); int getY() const; Point & … | |
[b]Menu.h[/b] [code] #pragma once #include <iostream> #include <cstring> using namespace std; class Menu { private: string title; public: Menu( void ); Menu( const Menu &unMenu ); ~Menu( void ); void setTitle ( string title ); string getTitle() const; }; [/code] [b]Menu.cpp[/b] [code] #include "Menu.h" Menu::Menu(void) { this->title = "Hello"; } … | |
I want to increment the [B]i[/B] without putting the whole statement in a loop. [code=c++] #prag... ostream &operator << ( ostream &output, const Course &xCourse ) { int i = 0; output << " " << i++ << ".| " << xCourse.code << " | " << xCourse.section << " … | |
[b]***Header Files:[/b] [b]Point.h[/b] [code=c++] #pragma once #include <iostream> using namespace std; class Point { private: int x; int y; public: Point(void); Point( int x, int y ); Point( const Point &xPoint ); ~Point(void); void setX( int x ); int getX() const; void setY( int y ); int getY() const; Point … | |
[b]Code[/b]: [b]NumeroReal.h[/b] [code] #pragma once #include <iostream> #include <cmath> #include <cstdlib> using namespace std; class NumeroReal { private: double n; public: NumeroReal(); // default constructor NumeroReal( double n ); // parameter constructor NumeroReal( const NumeroReal &unNumeroReal ); // copy constructor ~NumeroReal(); // destructor void setNumeroReal( double n ); double getNumeroReal() … | |
How can i make a string that will allow me to Use Spaces between the words ??? This code only allows me to post words without spaces. [code] cout << " Enter the Name of Employee # " << i+1 << ": "; cin >> N; myClass[i].setName( N ); [/code] | |
I made this Data Table. The problem is when the outputs are different it will change the shape of the Table. I need some tips on how can i fix this problem. [code=cpp] [INDENT]double sum = 0; for ( int j = 0 ; j < 5 ; j++ ) … |
The End.