49,766 Topics

Member Avatar for
Member Avatar for Urv73

I have a program that lets me enter participants in a race, their startingnumber, their start time and end time. The program then tell me who won the race and the winning time. This is my program: [CODE] #include <iostream> using namespace std; int main () { int start_Nr, start_Hour, …

Member Avatar for Urv73
0
170
Member Avatar for Syrne

Okay so I have a program that takes in up to 25 students and information for each including 5 test scores. All of that is done and working fine. What I am trying to do now is calculate the averages of each test 1-5 and then the total average of …

Member Avatar for StuXYZ
0
274
Member Avatar for dstaner

Hello, I'm just learning C++ and I'm getting an error with a program that is driving me nuts, and I'm not exactly sure how to resolve it. Can anyone help me? [QUOTE] AreaCalculator.obj : error LNK2019: unresolved external symbol "double __cdecl AreaOfTriangle(double,double)" (?AreaOfTriangle@@YANNN@Z) referenced in function _main \\.psf\Home\Documents\Visual Studio 2008\Projects\AreaCalculator\Debug\AreaCalculator.exe …

Member Avatar for dstaner
0
488
Member Avatar for geryin

Write a function to compute the value of the following series. f(x, y) = y( ((1/1) - (1/3)) + ((1/5) - (1/7)) + ((1/9) - (1/11)) ... + (1/(4x-3) - 1/(4x-1)) ) where the values x and y are given by the user. The main function should continue to query …

Member Avatar for frogboy77
0
86
Member Avatar for MichaelSammels

Hey there, all. I just complied a program in C++ on Microsoft Windows 7 Ultimate (MinGW). The only problem is that when I run it a command prompt also runs with it in the background, and can't figure out how to remove it. Any ideas?

Member Avatar for MichaelSammels
-1
195
Member Avatar for TinhornAdeniyi
Member Avatar for hardit_marwah

[CODE] i am a 13 year old stuck at this, someone please help me out!! i have a problem defining a character variable its giving the error lvalue required #include <iostream.h> #include <conio.h> void main() { clrscr(); char name [20]; cin >>" Your name please...", name; if (name="john") //over here!!! …

Member Avatar for Ancient Dragon
0
72
Member Avatar for MrJNV

I have a struct as follows: [CODE]struct Database { int accountNum; double balance; int months; };[/CODE] I want to make a vector of this struct, because I want the size to vary. How do I do that? Thanks in advance

Member Avatar for Fbody
0
97
Member Avatar for slavacrilov

I have a program that requires to reverse the name which is a string, here's the code... it's suppose to work, no errors found.... but "Run time error" [CODE] int i = fullName.length(); while (i>=0) { cout<<"Your reversed full Name is: "; cout<<fullName.substr(i-1, 1); i--; } [/CODE] thanks

Member Avatar for slavacrilov
0
108
Member Avatar for cperepelitsa

It's probably obvious that I'm more familiar with Python than C++... I was wondering if there's a convenient way of storing objects / miscellaneous STL structures on the hard drive for later importing and use in C++ in the same manner that Python does with the Pickle module. I know …

Member Avatar for rts1
0
4K
Member Avatar for malayasthana

i want to itterate through the vector and want to check if entered string is present in the string vector or not.. so please help me to know how can i do it i have done just as we do to itterate through vector<string>: vector<string>::iterator it; cout << "myvector contains:"; …

Member Avatar for Fbody
0
146
Member Avatar for Anuradha Mandal

I want to make an user defined STACK.But I have some problems with this following code. Please find what is worng. [CODE] #include <iostream> #include <conio.h> using namespace std; #define MAX 10 class stack { private: int arr[MAX]; int top; public: stack() { top=-1; } int m; void input() { …

Member Avatar for Taywin
0
95
Member Avatar for vinitmittal2008

Please give Free download links of Latest and Best C/C++ Compilers for Windows...

Member Avatar for Ancient Dragon
0
160
Member Avatar for myrk

Hello, Can anyone suggest a GUI library that meets the following criteria? * Cross-Platform * Doesn't control the main loop * Not 100% object-oriented; similar to Xlib :) * Not many pointers please (like FLTK that every object is a pointer) * Free to use for closed source and open …

Member Avatar for Stefano Mtangoo
0
709
Member Avatar for malayasthana

[CODE]vector<string> file_pass; if(count == m2+1) { p2_pass = onfile.tellg(); shift = p2_pass-p1_pass; onfile.seekg(-shift,ios::cur); for(j=0;j<shift-1;j++) { onfile.get(ch); temp_pass[j] = ch; } user_pass.assign(temp_pass,temp_pass+shift-1); file_pass.push_back(temp_pass); }[/CODE] for first input asthana it is giving asthana but after push back for second input saxena it is giving saxenaa i know last a is from first …

Member Avatar for Fbody
0
150
Member Avatar for vedel

I have a asm boot on a floppy disc and i want to show a c++ kernel (cuz c++ are easy). but how can i link it? I heared somethig about : extern _main call _main for asm. Can anyone help me? :'(

Member Avatar for vedel
0
226
Member Avatar for havalka

Hello everybody, I have got a code that read txt file. But I wounder how I can read many text file from a folder and save each one in a separate array. Help Please

Member Avatar for Ancient Dragon
0
79
Member Avatar for sundip
Member Avatar for georgy9002

Hello Guys I am having problems with an assignment. I need to create a class to make a rectangle. Then I have to - Declare an object of the class (rect1) using the default constructor. Now prompt the user for a Width, Height and Character. Store the results in temporary …

Member Avatar for mtbs1826
0
171
Member Avatar for im abcd

[CODE]# include <stdio.h> # include <iostream> using namespace std; int main() { int a,b,c; while (true) { cout<< " enter ur first digit"<< endl; cin>> a; cout<< "enter ur second digit" << endl; cin >> b; cout << " ur ans is "<< (a-b) <<endl; continue ; break;} scanf ("%d%",&c); …

Member Avatar for elsiekins
0
198
Member Avatar for jarejaa

Hello there I am implementing heap sort by maintaining min heap property. It is working fine but the order is descending, I want ascending order. One way is to invert the output array and get the desired output but this is not what I want. Like in min heap root …

0
64
Member Avatar for notmasteryet

hi guys, trying to figure out how to put X when seat is taken plz help [//Airplane Seat Assigning system. [CODE]#include<iostream> using namespace std; int main() { char seat [7][4]={}; //initalize 7 rows and 4 columns char arr[4]={'a','b','c','d'}; int i,j; int row, colnum; char col; for(i=1;i<=7;i++) { for(j=1;j<=4;j++) { //cout<<seat[i+1][j+1]; …

Member Avatar for low_coder
0
268
Member Avatar for garu525

I wrote this string palindrome program that reads input from a text file. All the syntax are correct but I have an error I couldn't understand. Any help is appreciated, thanks!!! First, this is the error message: [B]Error 1 error LNK2001: unresolved external symbol "char * newToCheck" (?newToCheck@@3PADA)[/B] And this... …

Member Avatar for garu525
0
179
Member Avatar for geryin

[CODE]#include <cmath> #include <iostream> using namespace std; void prime(int num) { int numPrime=true; for(int c=2;c<num;c++) { if (num % c == 0) { numPrime=false; break; } } if (numPrime == true) cout << "TRUE" << endl; else cout << "FALSE" << endl; } int main () { int n; int …

Member Avatar for WaltP
0
181
Member Avatar for denmark22
Member Avatar for group256
0
109
Member Avatar for BOAH365

Hello, I'm very new at C++ and I have to write a code that uses a recursive function to reverse some characters within a boundary, so lets say I have A[1] == ‘A’ A[2] == ‘B’ A[3] == ‘C’ A[4] == ‘D’ A[5] == ‘E’ and I put in a …

Member Avatar for BOAH365
0
186
Member Avatar for cmccaig

im writing a program for school that needs to search through a directory and find files of a certain type. if it meets up with a folder i need to search inside it and so on for all other folders found inside. i was thinking of a function to pass …

Member Avatar for Taywin
0
964
Member Avatar for MasterGberry

I am a novice @ coding right now, and am getting it by trial and error, when i run this program after the 2nd round of input it skips some of the steps and then crashes. I threw the if (i > 0) to help bypass it on the first …

Member Avatar for MasterGberry
0
94
Member Avatar for mdpepper

Good evening folks. Im a Computing student in 2nd year of Computer Science at university. My current problem is the idea of a class within a class. I have developed a .h and.cpp file for a Date class(day, moth year), and a .h and.cpp file for a patients record. I …

Member Avatar for mike_2000_17
0
165
Member Avatar for Anuradha Mandal

The End.