49,756 Topics

Member Avatar for
Member Avatar for vipulsrivastava

Design and implement a class named "Vector 5D" using C++ which stores a 40 hypothetical vector having 5 components, you may assume these components as V[1], V[2], V[3], V[4] and V[5] . The class should use array to store these components. The class should have necessary constructors and member functions. …

Member Avatar for Lucaci Andrew
0
147
Member Avatar for gil.nickson

hi, can you help me with my code? actually its running but the total price of products bought is not displaying, can you help me with this one? :( #include<stdio.h> #include<string.h> #include<conio.h> int main(void) { int pno, choice, product, jf=12,d=10,l=107,c=2,cf=22,n=9,b=19,ap,a,total,disc,i,ctr,nSelection; char name[50]; char cname[50]; char y; char x; float price,qty,tax,dis,bill,dprice,ttotal; …

Member Avatar for noah_2
0
282
Member Avatar for pragati gupta
Member Avatar for deceptikon
0
84
Member Avatar for issamsaad

Write a program that allows accepting a positive integer number n and displaying n rows as the following form: Example: n =6 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5

Member Avatar for issamsaad
0
110
Member Avatar for CreatorZeus

chan someone help me see this problem? its closed and everything. string notename; x = 1; cout << notename[x] << endl; if(remove(notename[x].c_str()) != 0) { perror( "Error deleting file" ); } else { cout << "File successfully deleted"; }

Member Avatar for Ancient Dragon
0
333
Member Avatar for triumphost

I have the following code for 2D dimensional arrays being flattened as 1D C-style arrays: #include <iostream> int main() { int width = 4, height = 10; int arr[width * height]; for (int i = 0, k = 0; i < height; ++i) { for (int j = 0; j …

Member Avatar for Banfa
0
988
Member Avatar for rowen_1

I am trying out sqlite3 create statements and forign keys in c++ and I came up with 4 requirements. 1) a employer can create a job position 2) a employer can view the form reject or shortlist the applicant for interview 3) a applicant may apply for a job position …

0
158
Member Avatar for kamalashraf

please tell me whats wrong in this code, i am getting error, help me to fix this. Course *array[10][5]; Course *array2[10][5]; while(!coursefile.eof()) { for (int i=0;i<10;i++) { for (int j=0;j<5;j++) { coursefile >> array[i][j]->getBook(); coursefile >> array2[i][j]->getSection(); } } }

Member Avatar for Moschops
0
138
Member Avatar for kamalashraf

consider this class class Course { string book; char section; public: Course (string bk, char sec) : book(bk), section (sec){} string getBook(){return book;} char getSection (){return section;} void print() { cout <<"book name is: "<<book<<endl << "section is: " << section << endl; } }; i want to make array …

Member Avatar for Ancient Dragon
0
106
Member Avatar for kamalashraf

i have 10 students, each student is associated with 5 courses and the section of course, i want to do this in array, please help regarding this. thanks. for example john book1 A book2 A book3 C book4 D book5 B marry book1 C book2 B book3 A book4 B …

Member Avatar for deceptikon
0
98
Member Avatar for CreatorZeus

I'm having a simple i/o with file problem. I have the name coming from a string but it just wont open at all. Incoming code: string notename[] = {"NULL","empty"}; ifstream readnote; readnote.open(notename[x].c_str(),ios::in|ios::out); if(!readnote) { cout << "Read Error"; } its prolly something small but i keep getting the error, can …

Member Avatar for CreatorZeus
0
283
Member Avatar for thomas_14

I have a function changeUserPassword() in user.cpp and I wanted to do a cppUnit test on it. here are some possible unit test for changeUserPassword 1. changing a password several times. 2. changing password to the same password. 3. changing a non existing password. 4. Changing the password on one …

0
92
Member Avatar for bramsever

can any body write QT calculator GUI application - to QT command mode program (in batch mode ) we need to give inputs from command mode

Member Avatar for alan.fontenele.1
-1
118
Member Avatar for mayyy

I have to write a program that generate 7 random numbers from 1 to 39 to write condition which don't allows to repeat the same number twice , and to sort them from the smallest to the greatest in the end to have this result **** LOTO GAME 7 TO …

Member Avatar for Ancient Dragon
0
92
Member Avatar for Seba Sama

Hello, I came across a strange pointer (in my opinion): `void *(*foo)(int *);` Why are so many stars there? It was explained like: "...read inside-out; notice that the innermost element of the expression is *foo, and that otherwise it looks like a normal function declaration. *foo should refer to a …

Member Avatar for Seba Sama
0
221
Member Avatar for breezett93

Hi Everyone, For a couple weeks, I have been developing a pi approximation program and making little upgrades. Right now, the program asks for an input of iterations and then prints out the approximation. Now, I want to have every iteration printed out into an excel file with an approximation …

Member Avatar for duskoKoscica
0
225
Member Avatar for user4678

I have the code for the first part of a problem, which is to write a program that reads an angle x (in radians) from the keyboard. Then, in a function, compute the cosine of the angle using the first five terms of this series. Print the value computed along …

Member Avatar for duskoKoscica
0
6K
Member Avatar for daviddoria

Should I use cmath to use PI and trig functions? I dont think math.h has it - and cmath and math seem like redefine alot of the same things. What is standard practice? Thanks, Dave

Member Avatar for duskoKoscica
0
2K
Member Avatar for CreatorZeus

so, im trying to make a simple funtion to see if there is a file in a folder. been looking everywhere but havent found one that worked out. annnnnnnnnnnnnd code snippet: ` WIN32_FIND_DATA FindFileData; HANDLE hFind; hFind = FindFirstFile(_T"C:\\Dev-Cpp\\notes", &FindFileData); if (hFind == INVALID_HANDLE_VALUE) { cout << "No File found\n"; …

Member Avatar for duskoKoscica
0
486
Member Avatar for emorjon2

hi everybody! I really need your help here. I am developing a 3D game. so far I have came no further than finishing the 3D engine and print out some basic 3D-models. everything works okay, with exception of a bug, occuring after a couple of minutes of running time. it …

Member Avatar for mike_2000_17
0
542
Member Avatar for William Hemsworth
Member Avatar for Labdabeta

Hello, I have a quick question about c/c++ syntax. Basically I am wondering when it is allowable to have numbers in identifiers. My compiler happens to allow numbers in: * Function names * Class names * Variable names * Pre-processor names As long as they do not begin with numbers. …

Member Avatar for Labdabeta
0
224
Member Avatar for Schol-R-LEA

In most modern languages, there are two fundamental approaches to repeating an action: either *iteration*, in which an action is placed inside a special-purpose structure which causes the action to be repeated, or *recursion*, in which a general-purpose function calls itself (or another function which in turn calls the earlier …

Member Avatar for Ancient Dragon
1
2K
Member Avatar for Vikram Sehgal

so i am new to c++ and my teacher told me to make a hotel management programme... well to make it more cool looking i wanna add those arror keys scroll selection this " --> " when press up key it goes to the first option, down to the other …

Member Avatar for Ancient Dragon
0
317
Member Avatar for mixelplik

I need to generate 40 random numbers between 50 and 100 using rand(). How do I do this? cout << sizeof(a) << endl; for(int i = 0; i < 40; i++) { if(rand() % 1000+1 >= 50 && rand() %1000+1 <= 100) a[i] = rand() %1000+1; } I was doing …

Member Avatar for Moschops
0
655
Member Avatar for EddieC

Companies using IBM's Rational and Tivoli product will breathe easier today, thanks to new, integrated versions of nine tools that the company says will facilitate communication and closer collaboration between software development and support teams in the enterprise. What's more, prices will remain where they are, and the updates are …

Member Avatar for Ancient Dragon
0
333
Member Avatar for rmsh92

Write a C++ program that reads a set of eight temperatures values and display the number of HOT, WARM and COLD records according to the following classification HOT >35 warm Between 27-35 cold <27 by using if statment

Member Avatar for 2384443
0
203
Member Avatar for keerthychandran
Member Avatar for Learner010
0
123
Member Avatar for duskoKoscica

Well I have created this one and on my computer it is working. I would like to hear about some alternative solutions. INTRODUCTION This time I have one algorithm, but to understand it we need to consider a few terms. First of all, we should be familiar with the pangrams. …

Member Avatar for duskoKoscica
0
342
Member Avatar for Sasquadge

Hey guys so I'm having an issue with my program. Some information about my program it stores a const char* str converts it to int which is in ascii then it runs a test on the number and converts it back to a string. Then it will also add these …

Member Avatar for Banfa
0
616

The End.