49,761 Topics

Member Avatar for
Member Avatar for mahesh113

How come the output of this program is 1413, I expected it to be 1414. (i + 1)->value() should have called R::value(). is n't it? #include<iostream> #include<vector> using namespace std; class Q { public: Q(int n = 0) : m_n(n) { } virtual int value() const { return m_n; } …

Member Avatar for Lucaci Andrew
0
166
Member Avatar for otengkwaku

Hi guys, i am working on a project the need me to convert a compressed obj file using webgl utf-8 compresor [webgl-loader](https://code.google.com/p/webgl-loader/) back to it acsii version. I will like someone to point me in the rigth direction. i am comfused as to how to do the decompression

Member Avatar for LastMitch
0
267
Member Avatar for new_developer

Hi there, Is there a way to check a variable if it is not initialzed by value ? I need a check for all datatypes. int num; if(!(numIsNotInitialized)) num = 12; else cout<<"num : " <<num <<endl;

Member Avatar for mike_2000_17
0
330
Member Avatar for new_developer

Hi there, I am implementing the concept of polymorphism and write following program of shapes. #include <iostream> using namespace std; class Shape { protected: double width, height; public: void set(double w, double h) { width = w; height = h; } virtual double get() { return 0; } }; class …

Member Avatar for new_developer
0
181
Member Avatar for oosinoots
Member Avatar for adam tolstoy
0
151
Member Avatar for DavidB

Hi, folks. I would like to start posting a few C++ code snippets and thought I would start with something well-known and simple: a Quadratic Equation Solver. I am trying to be as thorough as possible, so am also considering the possibility that a non-quadratic equation might be fed into …

Member Avatar for DavidB
0
333
Member Avatar for sanyam.mishra

I got some source code on net for displaying 256 bit bmp in turbo c++ which is using some assembly codes (actually using asm---about which I don't know anything). Unfortunately during compilation it give an error saying "286/287 instructions not enabled". Help me troubleshooting this problem.

Member Avatar for sanyam.mishra
0
714
Member Avatar for motlatsisehole

can u please help me, i have a question on classes that says, implement a matrix class that using dynamic memory allocation to add,subtract,multiply, display diagonals and deternimant, two matrices.

Member Avatar for Ancient Dragon
0
139
Member Avatar for njoguj

Write a C++ program to display your personal information: Name: A. Another School: Tuungane High School County: Umoja Year Joined: 2004 Subjects: Mathematics, Computer Studies, English School KCSE Mean: 9.82

Member Avatar for new_developer
0
113
Member Avatar for mrboolf

Hi all there. Firstly I apologize if this is not a specific question (please do point it out if you find this unpolite). I don't have real problems so if you're not personally interested feel free to save your time and close this thread :) Anyway, I had to write …

Member Avatar for jsdncjnsci
1
447
Member Avatar for MasterHacker110

I am getting into game programming more and more. I have been learning DirectX11 but it is hard and very low level. I am looking for a game librarie that has these spesifications: Must be in C++ (the library doesn's have to be written in C++. As long as I …

Member Avatar for gabryprof
0
217
Member Avatar for gobiking

Hello, I made a program that worked perfectly on one of my pcs. When I moved it to another computer I am getting an error now stating that I need to include a pointer on my fmin and fmax functions. I'ts somewhat lengthy but I want to know if maybe …

Member Avatar for gobiking
0
342
Member Avatar for sntoane
Member Avatar for sanyam.mishra
0
123
Member Avatar for triumphost

I have roughly 500 function pointers defined in a header like so for example: void (__stdcall *ptr_glAccum) (GLenum op, GLfloat value); void (__stdcall *ptr_glActiveTextureARB) (GLenum texture); void (__stdcall *ptr_glAlphaFunc) (GLenum func, GLclampf ref); GLboolean (__stdcall *ptr_glAreTexturesResident) (GLsizei n, const GLuint *textures, GLboolean *residences); void (__stdcall *ptr_glArrayElement) (GLint index); void (__stdcall …

0
154
Member Avatar for pearl doll
Member Avatar for cobaltfive

Hi I am back I need am working on an unfinished project and cant get it to compile past line 44 , any help with why it wont do that would be great . I just am trying to get what I currently have to compile . my assignment , …

Member Avatar for cobaltfive
0
236
Member Avatar for naveen19

no matching function for call to `getline(std::string&, char&)' Why is this error occuring? HELP ME SOLVE THIS My Aim is to copy each character or integer to an array A.S.A.P MY PROGRAM:- #include <fstream> #include <iostream> #include<conio.h> #include<string.h> using namespace std; int main () { char a[50]; ifstream someStream( "txt.txt" …

Member Avatar for Ancient Dragon
0
354
Member Avatar for okundi

discuss the fundamental data types supported by c++ programming language and state how each type is stored

Member Avatar for Moschops
-1
72
Member Avatar for okundi

a company pays employees gratuity on retirement that can be computed using the formular: grayuity= (salary x fixed rate x number of years worked) + one month salary. formulate an algorith that can be used to calculate the gratuity and write a c++ program that can be used for the …

Member Avatar for pritaeas
0
58
Member Avatar for Mr.UNOwen
Member Avatar for mike_2000_17
0
180
Member Avatar for Stefano Mtangoo

Hi, I know how to make C++ plugin based application with C++ plugins. I need to add ability to code plugins in Python. I want users to be able to write Plugins in any language (C++ or Python). What are fundamentals of writting app in C++ but support plugins in …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for Mr.UNOwen

Hello, So windows has PPL for multithreading for loops, what's the linux equivalent to that?

Member Avatar for mike_2000_17
0
195
Member Avatar for naveen19

I need to know whether in c++ we can read values from a .txt file and use it to calculate something. **EXAMPLE:-** *In the TEXT FILE-* FoodCode: f2,f3,g2 where anything of type **'f'** is **50bucks** and of type **'g'** is **100bucks**. & By using a C++ Program i want to …

Member Avatar for NathanOliver
0
93
Member Avatar for Tevin985

//I Have three lines of error code and can not figure out what is the problem! Lines of error are bolded! //They are in void circle(), void Trapezoid(), and void Sector().

Member Avatar for deceptikon
0
58
Member Avatar for naveen19

Hi, I want to know how to read multiple text files in this program... I have 5 text files(order1,order2,...order5) Can anyone pls help me with this? I use DevC++. #include<iostream.h> #include<fstream.h> #include<conio.h> #include<windows.h> using namespace std; class{ public: void menu() { ifstream menu; menu.open("menu.txt"); string STRING; string inFile_contents; string previousLine=""; …

Member Avatar for Lerner
0
960
Member Avatar for sirlink99

I am just starting out with c++, but I have a goal in mid. I have already programmed the logical portion of what I wish to acomplish in Java, but it doesn't work, because I can't set a usb to read only for the whole system in Java (if I …

Member Avatar for sirlink99
0
389
Member Avatar for Azmah

I'm looking at getting back to C++ . Its been awhile since I last did it, so I am planning on going from the very beginning and looking for a site to learn it from. I've found a few but wish for the best one to stick to. Thanks in …

Member Avatar for Labdabeta
-1
468
Member Avatar for grubby

Hi,I am a c++ beginner. I am using vs,and I got a problem in my code which check a sentence whether a palindrome or not. #include <iostream> #include <stack> #include <queue> using namespace std; int main () { bool palindrome = true; char character; StackType stack; Queue queue; char stackChar; …

Member Avatar for Lucaci Andrew
0
3K
Member Avatar for gobiking

Hello, I am trying to start implementing functions from a class into my Calculator just to get used to the idea of it. when I tried calling for my min max functions into my calculations function it is spitting out an error arguement of type "float" is not compatable with …

Member Avatar for gobiking
0
1K
Member Avatar for Gobroski

This works in C++ Builder: int chcolor; for(int d, d < 5, d++); { String name = "d" + IntToStr(i+1); TLMDSpeedButton* button = dynamic_cast<TLMDSpeedButton*>(this->FindComponent(name)); chcolor = random(6)+1; switch (chcolor) { case 1: button->Color = clRed; break; case 2: button->Color = clSilver; break; case 3: button->Color = clBlue; break; case 4: …

Member Avatar for Gobroski
0
588

The End.