49,761 Topics
| |
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 … | |
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); … | |
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 … | |
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 … | |
what is the logic to count number of objects created implicitly and explicitly inside the same program..Please help. | |
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> … | |
is this is the correct way 2 write destructor of copy constructor and parameterised constructor ~a(int x,float y) ~a(a &a1) | |
**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. … | |
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]; } | |
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 \ … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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++ … | |
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) … | |
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) { // … | |
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 // … | |
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 … | |
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> … | |
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 … | |
| 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=# cout<<ptr; cout<<ptr++; cout<<ptr; cout<<sizeof(num); getch(); } ![3283bd99afe1c651a274377d4deb3f45](/attachments/large/4/3283bd99afe1c651a274377d4deb3f45.jpg "3283bd99afe1c651a274377d4deb3f45") Thanx. |
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 … | |
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 … | |
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? ***** ***** **** **** *** *** ** ** * * ** ** *** *** **** **** ***** ***** |
The End.