49,766 Topics
![]() | |
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, … | |
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 … | |
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 … | |
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 … | |
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? | |
[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!!! … | |
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 | |
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 | |
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 … | |
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:"; … | |
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() { … | |
Please give Free download links of Latest and Best C/C++ Compilers for Windows... | |
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 … | |
[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 … | |
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? :'( | |
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 | |
Hi Does any buddy help me to convert char* to std::wstring | |
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 … | |
[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); … | |
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 … | |
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]; … | |
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... … | |
[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 … | |
how to make a simple browser using c++ and by using <stdio.h>&<conio.h> | |
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 … | |
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 … | |
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 … | |
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 … | |
What is the function of "cin.get()" and "cin.ignore()". |
The End.