49,756 Topics
![]() | |
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. … | |
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; … | |
write a programe to input any year and cheak whether it is leap or not | |
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 | |
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"; } | |
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 … | |
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 … | |
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(); } } } | |
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 … | |
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 … | |
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 … | |
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 … | |
can any body write QT calculator GUI application - to QT command mode program (in batch mode ) we need to give inputs from command mode | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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"; … | |
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 … | |
| |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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. … | |
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 … |
The End.