49,761 Topics

Member Avatar for
Member Avatar for can-mohan

Hi All, Usually in factory method we need to check the existance of object based on given argument and then need to return the object and due to this we need to have multiple if and else statement and while adding one more type then again one more else block …

Member Avatar for rubberman
0
263
Member Avatar for zelrick

Hello C++ Programmers; I would like to know if fill color can be automatic fill up a whole row when in two column have a number 6; for example: A B C D E F G H I J 1 98 132 3 146 6 54 8 210 8 2817 …

0
114
Member Avatar for TheFearful

Hello everyone, can anyone explain to me what is wrong with my project? I coded the program using my linux system using Vim and the g++ compiler. I then copied that text over to Visual Studio since I am assuming my professor is going to compile and run it through …

Member Avatar for Moschops
0
450
Member Avatar for mrismich

Im a student & and just started learning c++... My professor assigned me a program to get output as: 1 1 2 3 5 8 13 21 34 With the use of while loop... i hv made this>> #include<iostream.h> #include<conio.h> main() { int n=1,m=2; cout<<n<<' '<<n<<' '<<m<<' '<<n+m<<' '<<n+(2*m)<<' '<<4*m<<' …

Member Avatar for TheFearful
0
218
Member Avatar for Pilot122x

Ok, so right to it. int CSQLDB::Init(const char *host, const char *user, const char *passwd, const char *db) { //Init mySQL mySQL = mysql_init(mySQL); my_bool rec = 1; mysql_options(mySQL, MYSQL_OPT_RECONNECT, &rec); if(!mysql_real_connect(mySQL, host, user, passwd, db, 3306, NULL, NULL)) { printf("(!!!) mySql connection rejected!\n"); mysql_close(mySQL); return 0; } failed = …

Member Avatar for マーズ maazu
0
234
Member Avatar for homeryansta

[CODE=C++] #ifndef LIST_H #define LIST_H #include <iostream> typedef char Item; class List{ public: List() {first = NULL; last = NULL;} //~List() void append(Item entry); void remove_last(); void output(); private: struct Node { Item data; Node *next; Node *back; }; Node *first; Node *last; }; #endif [/CODE] I'm writing a class …

Member Avatar for Syed Zuman
0
968
Member Avatar for mrismich
Member Avatar for SpottyBlue

I got the questionairre problem. I was trying to fill the answers from the 20 questions and output the file as results.txt, but it only shows the answers of 19 questions. And when I fill up all the answers, the total score shows 0. The scores for each question (except …

Member Avatar for rubberman
0
196
Member Avatar for egieboom12

problem#1 Create a program that will count from 1 to n, wherein n is a user-input number. problem#2 Create a menu and combine previously-created programs into one im a newbie programmer i need help in using looping constructs... any suggestions???

Member Avatar for rubberman
0
146
Member Avatar for mrismich
Member Avatar for mrismich
Member Avatar for mrismich
Member Avatar for mrismich
Member Avatar for Shizza

i want to make an artificial system in c++ language for a doctor or any judge that will take input from the user and by using rule of inference it will display the result as true or false, can anybody help me to solve this problem

Member Avatar for pritaeas
0
311
Member Avatar for anumash

Consider a base class that is derived by two sub-classes and a third class derives from the above two classes. I make the base class virtual, so as to not make copies of the base class. My question is that do I have to include the base class constructor in …

Member Avatar for NathanOliver
0
173
Member Avatar for DigitalPackrat

I searched a lot but there seems to be no way to have additional color schemes in Dev C++. The existing ones are way too bland. Also, I am no good at colors, yet, it feels as if I don't have the control to choose enough colors in the Editor …

Member Avatar for Gabriel_8
0
4K
Member Avatar for Lutina

Good day people... I have a program...., when I call the function printReceipt I want a new console window to display the receipt, and then when the user presses enter it should take him/her back to the old console window. Just want to learn how to open multiple console windows.... …

Member Avatar for syncster31
0
119
Member Avatar for Ahmed_62

#include <iostream> using namespace std; //Write a recursive algorithm to solve the towers of Hanoi problem. //move disc 1 A to c ACB //move disc 2 A to b ABC //move disc 1 C to b CBA //move disc 3 A to c ACB //move disc 1 B to a …

Member Avatar for Ahmed_62
0
177
Member Avatar for anumash

Hi, I was learning operator overloading and I noticed a very strange thing. I could access the private variable of another object by using the object reference and the . operator. Both the objects belong to the same class and I can alter the value of a private variable of …

Member Avatar for anumash
0
269
Member Avatar for zelrick

Hello C++ Programmers; I would like to ask about running multiple text file; this text file don't have specific name; This one folder (Text Folder) have only text file (no specific counts); if there is other file like .xlsx or .jpeg or .bat or .etc. will be ignored; once I …

Member Avatar for richieking
0
293
Member Avatar for TÃ i

Chào các anh chị , anh chi có thể giúp em hiện thực đoạn code đệ quy này được không em làm hoài mà vẫn không hiểu -Use recursion with the following prototype: void recursiveTriangle(int N) Hint: you can use extra functions to accomplish this task. They should not contain …

Member Avatar for rubberman
-3
86
Member Avatar for toneranger

Hi, I'm wondering what could cause this type of runtime error: My program basically reads data from different kinds of data files, either a minute data file or a 5 minute data file and then does some analysis. When I run the program on the 1 min data, no problem. …

Member Avatar for David W
0
299
Member Avatar for cambalinho

see my MemoryDc and BitmapDC class's: class MemoryDC { private: HDC memoryDC; public: MemoryDC () { HDC hdc=GetDC(GetDesktopWindow()); memoryDC=CreateCompatibleDC(hdc); ReleaseDC(GetDesktopWindow(),hdc); } operator HDC() const { return memoryDC; } ~MemoryDC () { DeleteDC(memoryDC); } }; class BitmapDC { private: MemoryDC hdcbitmap; HGDIOBJ bitmapold; HBITMAP bitmapcurrent; int intwidth; int intheight; void init(int …

Member Avatar for triumphost
0
657
Member Avatar for ridhzee sidhu

why we use # as preprocessor in c++? why we dont use any other symbol like @,$,%,& etc. as preprocessors?

Member Avatar for ridhzee sidhu
-1
109
Member Avatar for Tim_6

Part 2 Deliverables Present a solution using pseudocode similar to that in part 1 . Identify the logic needed to capture a credit card payment where the user provides their account number, expiration date, and CVV code from the back of the card. Part 2 Deliverables Present a solution using …

Member Avatar for ddanbe
-1
360
Member Avatar for zelrick

Hi everyone; I got no idea how to start this and if it is possible; I have a text file (.txt) that have lot of lines and I want it to transfer it in Excel (.xlsx / CSV) But not all will be transfer in excel, only a specific number …

Member Avatar for zelrick
0
2K
Member Avatar for Mahnoor_1

I know coding in c++ pretty much ..but I want to learn graphics .. I am using DEV-C++ 5.11 .. Can anyone tell me online link to graphics site?

Member Avatar for dilantha.prasanjith.96
0
131
Member Avatar for nashmug

a) Write a loop to print all numbers from 1 to 100, one per line, Write a blank line after every five lines. [10]

Member Avatar for VatooVatoo
0
128
Member Avatar for cambalinho
Member Avatar for Charite

Hi everyone! So I am really new to C++ and am currently taking this computer science class in school. We use Visual Stuio 2013. Tomorrow I have 3 programs due and I have only finished 1 so far. Everything I read in my textbook and what the teacher says confuses …

Member Avatar for Moschops
0
254

The End.