49,756 Topics
![]() | |
Car passing at bridge tollbooth should pay 500. Mostly they do but sometimes a car goes by without paying. Model this tollbooth with class called toolbooth, the two data items are of tye integer total number of cars,and a type of of double total amount collected. A constructor initialize both … | |
Hi Guys, Which language would be best for building utility applications for windows?(Tune-Up,Advanced System Care,CCleaner etc.) I'm inspired by the visual display of those programs.I'm currently learning VB.NET and I've beginners knowledge in C++ but I find it too difficult. Note : I'm a professional web designer. | |
Can any one tell me what I am doing wrong. I am sorting a single linked list. void ll::sort() { for(int i=0;i<size-1;i++) {node *cptr = fptr; for(int j= 0;j<size-1;j++) { if((cptr->no) > (cptr->nxt->no)) { if(cptr == fptr) { node *c2ptr = cptr->nxt; cptr->nxt=c2ptr->nxt; c2ptr->nxt=cptr; fptr = c2ptr; } else { … | |
Hello everyone! I've read a lot of articles on DaniWeb and I've decided to join your community! I have a university project to make a bank account system, which consists of at least 10 account classes, and 3 of them inherit from at least 2 other. The system has 1 … | |
Please find and correct the error in my c++ program. "Linker Error: Undefined symbol _main in module c0.ASM" The program is for transfering content of one file to another. #include<fstream.h> #include<iostream.h> #include<conio.h> class student { int rollno; char name[20]; int tm; public: void input(); void transfer(); void output(); } obj; … | |
It's ok when I use uppercase letters, but I get random stuff when I use lower case letters #include <iostream> #include <conio.h> using namespace std; string sentence, key; int todo, koef, keylenth, senlenth; int main() { cout<<"Do not use spaces!"<<endl<<endl; cout<<endl<<endl<<"Key: "; //enter the key cin>>key; keylenth = key.length(); char … | |
Here's what I have. It compiles and runs the game, but when I make a guess right or wrong it ends the game. The words in the file are not separated by blank lines and idk how many are in there. (if that's significant). The problem is in the getWord … | |
My hangman game is complete. All i'm trying to do now is write the results of the end of the game to a file but the program is not doing that?? //Libraries #include <iostream> #include <vector> #include <string> #include <cctype> #include <fstream> #include <cstdlib> #include <stdlib.h> #include <windows.h> using namespace … | |
I'm trying to create a program that computes the values of cos using the Taylor Series as long as the absolute value of a term is greater than 0.0001 and prints the number of terms used in the series approximation. My code is the following and as of right now … | |
hello now i am creating an application on what i've learned up to now. so for that i don't wanna show white character over black screen(i don't wanna show white characters in console window ). i want something colorful text. and one more thing i also want for the application … | |
So I am using a while loop and my problem happens when I try and run this code in an online compiler which doesn't have input, it keep looping forever and doesn't wait for input. Is there a way I can force it to wait ? Please note that it … | |
Hi all, So i was just wondering what would be the best software to use to program in C++ and then compile the program. So could you please name any software packages that you know of which can help you to program in C++ and if you could also state … | |
Q.1) Write a program that prompts the user to enter five words (using one cin statement), and store them in five variables, and then sort the words alphabetically | |
Write a C++ program that will display the following menu and work accordingly. A menu which contains functionionality that will allow the following choices: 1. Enter the name of the file that contains students enrolled in the computer course. 2. Calculate and display the average and the letter grade for … | |
#include<iostream.h> void main(void) { int x=0,y=2 ; x=y*4 ; cout<<x<<endl<<y<<endl; } | |
Write a C++ program that can take either two integers or two floating point numbers and outputs the smallest number using class, friend functions and function overloading. | |
How can I use substring to print an ID number that is read from an input file to print out as for example, ***-**-4554 instead of 455454554? I was thinking of using modulus but it is too complex | |
I am trying to parse a text file with 1200 songs. I want to increase the barcount every time I come across a '|' or a ']' character. I want to have a new line every time the barCount is equal to 4. However, if I come across '\n' I … | |
Hi I need some help. I am trying to write a program that will search a file for numbers of type int and write the largest and the smallest numbers to the screen. This is how far I got but when I it came to writing the code that would … | |
I need help with my eiditing a record function, I'm struggling to get it to work. Thank you int Search(Student List[], int Size, string Target) { for(int i = 0 ; i < Size ; i++) if (Target == List[i].LastName) return i; return -1; } void Edit_Record(Student List[], Student & … | |
Hi Could anyone help me out to make a calculator in Visual C++ using Windows Forms. Thanks | |
I was practising with the past year questions for tomorrow's final exam. I wanted to read who has the highest score and show the highest score from the text file (see attachment). #include <iostream> #include <fstream> #include <string> using namespace std; ifstream infile; int main() { const int x = … | |
I need help with this program. here is what we are supposed to do. The program should prompt the user to 'Please enter numeric grade: '. The program will then pass the numeric grade to a function that will convert to a letter grade. This function should have the following … | |
am trying to hook createfile and related file functions with a hook dll that uses MS detours.i also have an injector that uses the commonly known code such as openprocess->virtualallocex->writeprocessmemory->create remotethread. CreateRemoteThread returns sucessfully but there is no evidence the dll is getting injected successfully in the target process.A test … | |
Please help me to understand the algorithm from this source code. int time(){ time_t rawtime; struct tm * timeinfo; time (&rawtime); timeinfo = localtime (&rawtime); cout<<"Current time: "<<asctime(timeinfo); } | |
I have a problem when I do my task. task: Made a program about queue in Bank teller system. Teller A if deposit <=10million, teller B > 10million the count of customer(queue) is random and the price if deposit is random too. output: how much customers,time and total transaction at … | |
Can someone kinda check this one to see what wrong with it? #include <iostream> using namespace std; int ture ( int a[], int b[], int d); int main () { int b [5]={1,2,3,4,5}; int a [5] ={1,2,3,4,5}; int total= ture(b, a, 5); cout << total << endl; } int ture … | |
Hello, I can get OpenGL to render 3D scenes to the screen, but I want to render them to a pixel array. Basically I want some magical code to fill in the blanks for this code segment: int width=500; int height=500; uint32_t *colours=new uint32_t[width*height]; //Magic code! glBegin(GL_TRIANGLES); //other drawing stuff, … | |
Hi, I've been having trouble getting the average and letter grades to print and they are outputting as 0 .. I tried everything calling the average function etc. but I still get a zero. Any advice? I don't have any other problems just need help with the average function and … |
The End.