49,761 Topics

Member Avatar for
Member Avatar for Mantroskylo

This is an assingment i've been working on but since this is a merge between two previous developments i need a little help solving my issue here that would be highly appreciated. In a nutshell what this program needs to do is recieve a .txt file create a vector holding …

Member Avatar for rubberman
0
289
Member Avatar for nattu

Can u plx help me to display the score with each correct answer in Jumble word game in C++ and Gwin here is so far upto where i have gone #include"gwin.h" #include <iostream> #include <string> #include <fstream> #include <time.h> using namespace std; using namespace GwinColourNames; int main() { GWindow Gwin(500,400); …

Member Avatar for np complete
0
532
Member Avatar for Rina Richie

Make a program that would count and add numbers which either one of the remainders when divided by 2 given divisors is equal to remainder searched. The program should accept 5 numbers to be divided by the 3 entered divisor. Sample Output: Enter divisors : 2 4 Enter remainder to …

Member Avatar for rubberman
0
235
Member Avatar for MasterHacker110

I have a simple program that is suppose to read character by character from a file, then if a counter reached a certain limit, it will print those characters in hex format and continue reading the next character from file: Here is my code, but it isnt working correctly, instead …

Member Avatar for vajeerpatel
0
148
Member Avatar for laavanya

what is the logic to count number of objects created implicitly and explicitly inside the same program..Please help.

Member Avatar for laavanya
0
2K
Member Avatar for anuran

iam trying to optimize a code i want to run code for arm_no=1000, its running for 100 arms but further increasing causes segmentation fault core dumped. to run the code use $ g++ Epsilon_greed.cpp -lm `gsl-config --libs` $ ./a.out but you'll have to install libgsl0 i.e gnu scientific library. #include<stdio.h> …

Member Avatar for anuran
0
469
Member Avatar for abhinav.gokooloopadhya.5
Member Avatar for pooja.singh.3950

is this is the correct way 2 write destructor of copy constructor and parameterised constructor ~a(int x,float y) ~a(a &a1)

Member Avatar for nchy13
0
243
Member Avatar for suryavanshianki

**I am new in Visual C++ 2008. here is a project which is alredy developed and this time under maintence. In this project there are 5 projects which one one project is depend on another example a,b,c,d,e are 5 projects and b depends on a,c depends on b i.e --a-->b-->c-->d-->e. …

Member Avatar for deceptikon
0
306
Member Avatar for devourer17

fstream f; char ch; int i=0; string word,word2[200]; f.open("op3_sort.txt",ios::in|ios::out); if(!f) cout<<"\nUnable To Open File!\n"; else { cout<<"\nLet's View D Content!\n"; while(!f.eof()) { getline(f,word,'\t'); word2[i]=word; i++; cout<<word2[i]; } } cout<<"\nShowing Data Now\n"; for(int a=0; a<i; a++) { cout<<endl; cout<<word2[a]; }

Member Avatar for devourer17
-1
150
Member Avatar for manel1989

Hi everyone! I would like to know how to create a xml file and display it in a fixed location other than the console, I have successfuly create and display it in the console, what I want is to display in the following location C: \ Users \ abdelhalim \ …

Member Avatar for manel1989
0
286
Member Avatar for manel1989

hi! i want to concatenate a string with an integer that's why i used this code : ++k; char f[50]; sprintf(f,"%d",k); strcat ( f,"N"); but what i got is this ( for example :**1N**) and what i want is some thing like this : **N1** Could you please help me …

Member Avatar for Ketsuekiame
0
210
Member Avatar for kal_crazy

I can not get a sum from a function and return to main to check whether the sum is greater than the money added in and input more money. int vending::MakeSelection(int ItemPrice[], int NumItems[], int sum){ int response; do{ cout << "Item:"; cin >> response; if(response == 1){ for(int i …

Member Avatar for kal_crazy
0
444
Member Avatar for nmakes

I've got a problem understanding inheritance. #include <iostream.h> class A { public: int x; }; class S1: public A { public: int x; }; class S2: public S1 { public: int x; }; int main() { S2 obj; cout << obj.x; return 0; } In the code above, I basically …

Member Avatar for Ancient Dragon
0
225
Member Avatar for erinkay528

Here is my assignment. I would like someone to walk thru some of this with me if you have time today. This is my last assignment and I just dont understand parallel arrays and how to recall information. If someone could help me get started that would be a big …

Member Avatar for Ketsuekiame
0
510
Member Avatar for nmakes

I am getting garbage values for this program.. Please help. /* =============== == Program 8 == =============== Q. Write a program to enter and print student's details (Personal, Academics and Skills) using multiple inheritance */ #include <iostream.h> #include <string.h> #include <stdio.h> #include <conio.h> class skills { public: char hobby[]; char …

Member Avatar for nmakes
0
246
Member Avatar for devourer17

I've a text file : Random.txt which comprises of Jade 12MS234 Male 18 Rocky 12MS324 Male 18 Marx 12MS632 Male 18 Now in my program i've a class class stud ( char name[10] char reg[10] char gender[10] int age ) Now I've to write a code in c++, where i've …

Member Avatar for Moschops
0
459
Member Avatar for titas.datta

Hi! I have written a code to subtract 2 large integers stored in arrays! But the problem is, its not working when the minuend is smaller than the subtrahend, i.e, when the answer would be negative. I am taking 2 char arrays as parameters, converting them to int arrays, working …

Member Avatar for Ketsuekiame
0
398
Member Avatar for Prem_1

How to compute current ratio in C++ with using header file? Calculate in c++ program with *3* different file. **- 2 file (cpp file) - 1 file (header file)** Information: formula---> **Current ratio = current asset / current liabilities** Please correct me If I'm wrong. I just start study C++ …

Member Avatar for deceptikon
0
664
Member Avatar for christinetom

Hi everyone.. :), me again. I've never used Linked Lists.. They don't make sense to me. I kind of understand them though. There's plently of online explanations explaining what they are but they all go down the same path. I'm trying to undertstand how one Note (via the next pointer) …

Member Avatar for christinetom
0
273
Member Avatar for phorce

I'm attempting to implement the Factory Pattern. I have a class called "Window" which has a class member function which determines which object is being called and then assigns the particular object pointer. I have written the following code: class Hamming { public: Hamming() { } Hamming(int theSize) { // …

Member Avatar for deceptikon
0
187
Member Avatar for David W

Because things, these days, seem a little 'slow' around this forum, please forebare this old post, (that was recently resurrected by an inquiring mind), and humour this 'update', in good faith that this update might be appreciated by some beginning students of C++ ... :) // beginnerBadCppExampleCodeBeforeFixedUp.cpp // 2013-08-14 // …

Member Avatar for deceptikon
0
450
Member Avatar for JameB

Hi guys, I'm working on a side project for a friend and I'm looking for a C++ library that allows me to put bunch of paragraphs in a PDF format. Anyone know any good libraries that can do this as simply as possible? It will be just paragraphs and paragraphs …

Member Avatar for iamthwee
0
764
Member Avatar for leonidas007

i've being trying to fix the error in my code for quite some time but am unable to resolve one or two of the errors like expected primary-expression before 'public' main.cpp:211:22: error: expected ';' before 'public' main.cpp:216:23: error: expected '}' before 'else' i am a beginner in programming # include<iostream> …

Member Avatar for mike_2000_17
0
149
Member Avatar for Jordancrack
Member Avatar for cedwards

Hi Im trying to create a random 2D array (3 x 3) so that numbers 1-9 will randomly be placed in the grid behind the '?' shown in coveredarray but in the guessarray just wanted to know if im doing right, im faily new to C++, also i wanted how …

Member Avatar for vijayan121
0
280
Member Avatar for Rahul47

This simple program of pointer generating THREAT Warning and identified as MALWARE. I dont see HOW ? #include<stdio.h> #include<conio.h> #include<iostream.h> int main() { int num; int *ptr; ptr=&num; cout<<ptr; cout<<ptr++; cout<<ptr; cout<<sizeof(num); getch(); } ![3283bd99afe1c651a274377d4deb3f45](/attachments/large/4/3283bd99afe1c651a274377d4deb3f45.jpg "3283bd99afe1c651a274377d4deb3f45") Thanx.

Member Avatar for Rahul47
0
336
Member Avatar for phorce

Sorry if this is hard to understand what I'm trying to do here, but, I do not know how to approach this. I am using method overloading in my constructors of a class, and I have multiple "Window" functions which are all classes that can be used and I need …

Member Avatar for mike_2000_17
0
292
Member Avatar for cedwards

Hi Im trying to create a random 2D array (3 x 3) so that numbers 1-9 will randomly be placed in the grid behind the '?' shown in coveredarray but in the guessarray just wanted to know if im doing right, im faily new to C++, also i wanted to …

Member Avatar for cedwards
0
197
Member Avatar for max2011

hi. i am marsh a student guys i have a activity but i don't know to start it with a loop. can you help me? ***** ***** **** **** *** *** ** ** * * ** ** *** *** **** **** ***** *****

Member Avatar for Gonbe
0
191

The End.