49,756 Topics

Member Avatar for
Member Avatar for josberty

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 …

Member Avatar for josberty
0
184
Member Avatar for SirDK

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.

Member Avatar for Banfa
0
290
Member Avatar for H_beginner

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 { …

Member Avatar for richieking
0
310
Member Avatar for Slavi

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 …

Member Avatar for Slavi
0
1K
Member Avatar for bugmenot

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; …

Member Avatar for NathanOliver
0
2K
Member Avatar for Vigenere

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 …

Member Avatar for tinstaafl
0
554
Member Avatar for Is_at_work

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 …

Member Avatar for Ancient Dragon
0
553
Member Avatar for Is_at_work

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 …

Member Avatar for kal_crazy
0
173
Member Avatar for user4678

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 …

Member Avatar for Labdabeta
0
627
Member Avatar for Learner010

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 …

Member Avatar for kal_crazy
0
74
Member Avatar for KrazyCod3r

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 …

Member Avatar for KrazyCod3r
0
302
Member Avatar for Chinney

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 …

Member Avatar for Chinney
0
312
Member Avatar for amani_1

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

Member Avatar for rubberman
0
89
Member Avatar for Epn5014

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 …

Member Avatar for Ancient Dragon
0
153
Member Avatar for Ravneet_1

#include<iostream.h> void main(void) { int x=0,y=2 ; x=y*4 ; cout<<x<<endl<<y<<endl; }

Member Avatar for kal_crazy
-2
262
Member Avatar for vaishali.k

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.

Member Avatar for yazan.quraan.39
0
153
Member Avatar for refphlex

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

Member Avatar for nullptr
0
76
Member Avatar for sarah.mathieson.7

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 …

Member Avatar for Ancient Dragon
0
198
Member Avatar for rayborn66

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 …

Member Avatar for Emran__
0
2K
Member Avatar for refphlex

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 & …

Member Avatar for zouhair.kasmi
0
145
Member Avatar for djmaz
Member Avatar for djmaz
1
36
Member Avatar for Nagy Razvan
Member Avatar for deceptikon
0
41
Member Avatar for SpottyBlue

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 = …

Member Avatar for Moschops
0
397
Member Avatar for sutty8303

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 …

Member Avatar for Faisal Kazmi
0
18K
Member Avatar for wbsat

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 …

0
72
Member Avatar for hendraligawan

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); }

Member Avatar for Ancient Dragon
0
103
Member Avatar for hendraligawan

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 …

Member Avatar for hendraligawan
0
196
Member Avatar for chubbyy.putto

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 …

Member Avatar for gerard4143
0
107
Member Avatar for Labdabeta

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, …

Member Avatar for Labdabeta
0
5K
Member Avatar for refphlex

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 …

Member Avatar for refphlex
0
438

The End.