49,761 Topics
| |
I have this assignment where I'm supposed to read in a text file and assign the values to a vector and sort them out. The text file has values for country, population, birth rate, and death rate. An example is: (not realistic numbers) USA 400000 5400 3200 Canada 56000 3400 … | |
I have a problem I'm not sure where the error is occurring. I think it's when I used cin.ignore in my code. My problem is occurring in case A. For some reason the program stops right after I enter my price information. I tried doing small codes to figure where … | |
There is a sample program in my C++ book that uses the += operator, and doesn't explain how it works: [CODE]gold += silver / SILVERPERGOLD;[/CODE] What exactly does this mean? | |
Hi guys, below is what i have so far and I am having trouble outputting the players' data in descending order. For some reason, my output is in ascending order. Also, I need to check if the user enters a player number that has already been used, and then prompt … | |
How can this BST class be better? [code] #include <iostream> #include <iomanip> #include <stdlib.h> #include <time.h> #include <conio.h> using namespace std; template <class KeyType, class ValueType> class BST { public: BST(): mroot(0), mcount(0) {} BST(BST const& tree) { *this = clone(tree.mroot); } BST& operator=(BST const& tree) { if (this != … | |
I am pretty sure that the answer for this is n^3, because the 3rd for loop is executed n times and the middle is executed n+4 times and the top one is executed n times. I understand how to use sigma notation for the bottom and top for loop because … | |
An exercise in Stroupstrup's book is to write a program involving memory allocation with an infinite loop and let it run until it crashes. He says the crash will be due to [i]memory exhaustion[/i]. He also suggests researching the topic. I did and am frightened by what I found. The … | |
Hello , sometime ago I started a small project centred around some crazy mutating breeding rabbits( sounds silly but I have learned an awful lot ,especially about lists). Anyway , as each year passes the number of rabbits grow - not exponentially but very quickly all the same. The next … | |
The question is to - Suppose you have a main() with three local arrays, all the same size but type (say float). The first two are already initialized to values. Write a function called addarrays() that accepts the address of three arrays as arguments add them and put their sum … | |
I need to return the numbers of the lotto ticket to main, then call a print() to print the numbers. But the ticketGenerator only returns 1 number. Please help [code] #include <iostream> #include <ctime> using namespace std; int ticketGenerator(int); void printTicket(int,int); int main() { int size; int numbers; cout << … | |
Ok, I am having two issues with this program, and since I am new to the forum, yes, I am a beginner so I am sure the error is so common it makes you want to cry seeing it again, haha. Anyway, the program is supposed to keep working with … | |
Hi, I have been working on this small console applications for 2-3 days now but I cannot find the problem. The Task is that I have to read a file which has sentences in english and I just have to get the frequency for each character and print it out … | |
hi friends, i was doing functions and i encountered this thing that automatic variables are stored as stacks and static,global as heaps.I am in a bit confusion about these terms......can someone help me out...plz | |
I have this tow errors ,how I can solve it.any ideas? error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib AC fatal error LNK1120: 1 unresolved externals Debug\AC.exe AC | |
hi, I am new to programming and looking for some help, here is the portion of the assignment that is giving me headaches: using one function, upload (i.e., input) the integer value and the color text, ignoring the word "Color:"; the function must only upload one data pair (i.e., the … | |
I just found this tough question in the last year Q Paper of this competition...1st how can I take inputs in a single line??(noob question) 2nd Can any1 help me with the logic to use...If u cud write a small eg. prog I would be greatly thankful NOTE:I had also … | |
Hi, I have been trying to use a struct to hold some const chars that represent a fixed date The idea is to select a date on a Month Calendar and compare it to the fixed date in the struct so that a MessageBox can show [code] typedef struct BASEFULL … | |
Hi! I am a beginner in C++, I hope that anyone can advice me on approaching this problem. I would like to implement a class graph that uses breath-first search in order to remove a chosen vertice as well as its corresponding edges. I want to: *add or remove edges … | |
I just found this tough question in the last year Q Paper of this exam...I dont know how to take that type of input,leave alone the logic...Can any1 help me with this program, plz... : [B] Question 1 Vogon zoo On the icy planet Zorg, the Vogons are putting together … | |
Hi! I am having trouble with this program. I'm done with the creation of records. My problem is, I cant make it print a record using the Record Number inputted by the user. I used seekg() but it doesn't work. I have attached the files for reference. try.cpp and accounts.txt … | |
What do the numbers tell me, in terms of frequency, amplitude and maybe time? Thank you muchly! drue | |
Hi there, Can anyone tell me how to change my win32 programs icon (top left). I'm running MSV C++ Express 2010, so i don't have MFC. Theres a few tutorials on how to do this but using resource files? Which apparently MSV doesn't support. I want to be able to … | |
Okay here's what I'm trying to do use a for loop get 5 numbers from input ONE number at a time. Output the sum and average of the 5 numbers. I am only allowed to use a maximum of 2 variables to solve this problem. Heres my code so far, … | |
I Try to make program Audio Recorder from LIne In / Microphone using C++ Builder. I get 2 Error message : 1. E2171 Body has already been defined for function '_fastcall TForm1::~TForm1()' 2. E2188 Expression Syntax Can somebody help me to finishing this problem ? Here my Simple program : … | |
I have a VS project which is compiled using the unicode character set. I load a dll using LoadLibrary and that dll is also built using the unicode character set. I use a method exposed by the dll which returns me a std::string. I am having some trouble with converting … | |
I'm currently having an issue with moving the camera around the z-axis (roll). For debugging purposes, I have an object with which I've tested with all 3-axis rotation and movement and it's working as expected; the object in question as well as the camera class superseed a positions class for … | |
1>------ Build started: Project: allegro, Configuration: Release Win32 ------ 1> allegro.cpp 1>MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main 1>c:\users\lenovo\documents\visual studio 2010\Projects\allegro\Release\allegro.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== | |
Hello, I started C++ and I have a trouble with this thing. I can't make it work. What I am trying to do is to get the value and calculate the area of a circle using a class type of coding style. Note that this does not even compile. "Where … | |
I readily admit that I am not a heavy developer, otw I probably wouldn't have this problem, but here it is. I cannot get openssl to compile under Windows. Mingw/msys is installed ok. Downloaded then unpacked openssl under my mingw home dir. So far ok. cd to openssl-1.0.0a Executed ./config … | |
How can I make a student data base using linked list in c++. |
The End.