49,761 Topics

Member Avatar for
Member Avatar for Magda6347

I Need to create a random number for a bank account. When the user presses the submit button after entering personal info a message box with their account number is supposed to appear( ex:"Your account number is 1000550") after the account number is created the user can go to a …

Member Avatar for Magda6347
0
161
Member Avatar for rodrigo.l.salazar.14

Hello so I finally was able to read intergers from a file and put them in an array. Now I have to put those numbers in different arrays. If they are even they go to the even array if odd go to the odd array. Now I thought this was …

Member Avatar for vmanes
0
179
Member Avatar for Magda6347

Hi I have a project where Im creating a bank account. In the bank account the user is supposed to choose either checkings or savings from a combo box. once that is selected and the user presses submit button the selection is supposed to show up under a label in …

Member Avatar for Ancient Dragon
0
110
Member Avatar for mjbor1

hello i have a problem in cin characters this is my code //file LE.h struct nodetype; const int SIZE=81; typedef char dataline[81]; typedef nodetype *nodeptr; class LED { public: LED(); ~LED(); void insert(dataline lines); void Delete();//delete currnt line void move(int num); int cnt();// To Find Number Of Nodes. void list(); …

Member Avatar for Ancient Dragon
0
133
Member Avatar for tealpenguin

I'm having trouble with a couple of things in my program. I want to create 3 different players and then record their scores to a file called highScores.txt I need to also come up with another game that features an array in it (i would put this in the place …

Member Avatar for NathanOliver
0
216
Member Avatar for kshahnazari

have a simple question about working with files . when Im reading a txt file like this example Hello how are you. fine thank you. when I read it how can I find out there was an endline or not ?

Member Avatar for deceptikon
0
110
Member Avatar for gfp91

hi all. i am a student and i have been lucky enough to try out the havok engin which can use c++. as it is the engin i am using i cant use openGL otherwise ide not have this problem i want to give an object in 3d space a …

Member Avatar for mrnutty
0
104
Member Avatar for munchlaxxx

After you enter a name, it just prints out "Would you like to convert another name? (y/n) " it doesn't even give the user a chance to enter anything and it doesn't print out the converted name. It just ends...Why? #include<iostream> #include<string> using namespace std; void conversion(char name[]); void lowercase(char …

Member Avatar for Gonbe
0
2K
Member Avatar for strungoutfan78

Hi all. I've taken a long break from my C++ studies but I'm now being shoved into finding an internship for school so I figured I'd play around and brush up on my coding. I've written this simple tabata countdown timer and I would like opinions on how it could …

Member Avatar for strungoutfan78
0
188
Member Avatar for NewUser22

Hello, I'm just having a heck of a time trying to figure our the answer(s) to the following questions: 1. Declare a struct type, Time, that represents an amount of time consisting of minutes and seconds. 2. Write statements that assign the time 6 minutes and 54 seconds to a …

Member Avatar for Ancient Dragon
0
297
Member Avatar for daino

Heyall. I'm trying to use the sqlite3_exec function and am having trouble with the callback feature. I've placed my code below. I realise the callback function provides and argument void *data and the sqlite3_exec function provides a const char *data variable. That is where I'm getting the error. I've searched …

Member Avatar for Ancient Dragon
0
809
Member Avatar for marnun

It seems I don't understand completely reading from and into files, line by line. Here is my code that is supposed to read lines of two file, into string variables, I assume, and then write them into third file: *line of first file line of second file .... so on …

Member Avatar for marnun
0
277
Member Avatar for sheikh zohaib

hey all i am new to all this languages and Computer sciences so if you help me i am trying to write a code and its constantly giving me errors here is the code at line 10 , 102 , 115 tell me how to fix it.. waiting... #include<iostream.h> void …

Member Avatar for sheikh zohaib
0
176
Member Avatar for pilotkid424

I am trying to create a function which adds an array to another array and replaces the data in the 1st array with the new data. For example, A=A+B. However, when I write my code as below, I get the error C2676:binary '[' : 'const Matrix' does not define this …

Member Avatar for pilotkid424
0
218
Member Avatar for jlillie

Hi Guys, I'm stressing out over this project. The majority is done. I keep getting an buffer errors. I'm stuck and can't figure it out. I did call stack and it took me to the last parenthesis in main. The closing parenthesis. Also I can't figure out why my card …

Member Avatar for vmanes
0
164
Member Avatar for restrictment

I keep getting errors and I don't know why.. #include <iostream> using namespace std; class IceCream{ private: int flavor[3]={0,0,0}, topping[3]={1,2,3}, scoops[3]={4,5,6}; public: int getFlavor(int); int getTopping(int); int getScoops(int); void setFlavor(int); void setTopping(int); void setScoops(int); }flavorX, toppingX, scoopsX; int IceCream::getFlavor(int choice){return flavor[choice];}; int main() { cout << flavorX.getFlavor(1); system("PAUSE"); }

Member Avatar for mike_2000_17
0
140
Member Avatar for pars99

Is it possible to have a piece of C++ code display a picture and how? I want to display something for my Uncle's employees at a conference were holding with them and I don't know how to display pictures, if there is a way.

Member Avatar for deceptikon
0
197
Member Avatar for serita.v.campbell

ok i dont quite know why i keep getting these error in my program.. here is the program: #include<stdlib.h> #include<stdio.h> #include<math.h> Void open(void); int read(float*); float average(float*); void write(float*,float); void close(void); FILE *fptrin,*fptrout; main() { float number[10],non,ave; open(); read(number); non=read(number); ave=average(number,non); write(number,ave,non); close(); return(0); } void open(void) { fptrin=fopen("avg.dat""r"); if(fptrin==0) …

Member Avatar for Gonbe
0
206
Member Avatar for haidang.nguyen

So I was given the assignment that asks user to enter file name, then the program will read all integers from the file (unknown number of integers) to an array, and display highest, lowest number, average and number of integers read. The only problem that I have with this is …

Member Avatar for deceptikon
0
159
Member Avatar for CHOCHOCHO
Member Avatar for hasan101002

why the code is not running? #include<iostream> #include<string.h> using namespace std; class person { char name[20]; float age; public: person(char *s,float a) { strcpy(name,s); age=a; } person & person::greater(person &x) { if(x.age>=age) return x; else return *this; } void display(void) { cout<<"Name:"<<name<<"\n"<<"Age:"<<age<<"\n"; } int main() { person P1("John",37.50),P2("Ahmed",29.0),P3("Hebber",40.25); person P('\0',o); …

Member Avatar for hasan101002
0
402
Member Avatar for myk45

Hello All, i am trying to tidy-up some code and i'm not completely sure how this can be done. What i have is this: (This is some sort of psuedocode that i just wrote to explain the problem, not proper code) void foo1(typeofList1 list1) { for (i = 0; i …

Member Avatar for myk45
0
190
Member Avatar for fishsticks1907

Im trying to read in data using both getline and cin from a file. But, it only reads in the first line and it leaves everything else empty and/or gives garbage values. output: John Brown grades: 73 57 94 grades: 0 32767 1252009800 grades: 0 0 1263344400 /* data.txt John …

Member Avatar for vmanes
0
224
Member Avatar for DarkVision

here my code now my problem i wonder if you can do something to access specific method from each object example i want to access from Dalek class his method but i cant do this "alien[i]->" will only access method from class ExtraTerrestre any help will be appreciate sorry for …

Member Avatar for Ancient Dragon
0
152
Member Avatar for Jbvo

I am having a hard time figuring out polymorphism with vectors. I keep getting random numbers which I'm guessing is the memory location. If that is the case what am I doing wrong with pointers. And here is part of my .cpp file. Thanks in advance for your help. // …

Member Avatar for Jbvo
0
91
Member Avatar for izabella.pearson

You are to write a program that will do the following: Part 1 (30 pts) Grade a 30 multiple-choice question exam and print each student’s name followed by the score (number of correct answers), the appropriate calculated percentage score (number of correct answers divided by 30), and letter grade for …

Member Avatar for phorce
0
199
Member Avatar for marnun

We started learning Heap property in class. Here is an exercise on the topic: > isHeap > Write the definition of a function named isHeap that receives three arguments as follows: > x : an array of ints > i : a valid index into the array x > n …

Member Avatar for marnun
0
237
Member Avatar for dr_iton

I'm a student and I have to make a program with Console application to manage a Bank Account, using Classes. The program must be able to: - Create e new bank account - Deactivate a bank account - Draw money from account - show the account balance I tried to …

Member Avatar for dr_iton
1
2K
Member Avatar for motrcolt

Im not really sure if you guys do graphics.h questions here but here it goes. Im trying to find out how to get text to scroll similar to credits at the end of a movie from top to bottom but to have it repeat. I cant find online anywhere that …

Member Avatar for Ancient Dragon
0
928
Member Avatar for milan2011

Hi, i am trying to make a dictionary which takes an english word and its meaning in spanish in the following format from an input file. <english>:<spanish> i also need to add words manually,remove,search,print ,and store new tree in the same file by updating the file. my up() and load() …

Member Avatar for jrobertomar
0
2K

The End.