49,761 Topics
| |
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; } … | |
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 | |
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; | |
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 … | |
How can i draw concentric cirles in c++ with a user inputed radii? | |
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 … | |
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. | |
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. | |
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 | |
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 … | |
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 … | |
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 … | |
code that mimic a shopkeeper services, counting stock, selling, billing | |
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 … | |
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 , … | |
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" … | |
discuss the fundamental data types supported by c++ programming language and state how each type is stored | |
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 … | |
Is there a preprocessor that can check if a header exists before trying to #include it? | |
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 … | |
Hello, So windows has PPL for multithreading for loops, what's the linux equivalent to that? | |
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 … | |
//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(). | |
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=""; … | |
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 … | |
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 … | |
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; … | |
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 … | |
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: … |
The End.