49,761 Topics
| |
Write a program with a function main () and selecting a menu of functions: Generate a programming-random number generator data for lottery ticket / max 100 / with six-digit numbers and store them in an array -Overwrite generated a new array and sort this array in ascending order and display … | |
Hi, I have a function which returns a pointer to array with data: `float * EZ_MATH::EZ_GE_BY_ME() { ... }` Now, how can I access this data? This doesnt work: `float * memA = temp_m.EZ_MATH::EZ_GE_BY_ME();` `ofstream output("out_file", ios::out);` `output << memA[0] <<endl;` `output << memA[1] <<endl;` Help! | |
| #include <iostream> #include <string> #include <iomanip> #include "mainmenu.h" using namespace std; string bookTitle[20] = {""}; string isbn[20] = {""}; string author[20] = {""}; string publisher[20] = {""}; string dateAdded[20] = {""}; int qtyOnHand[20] = {0}; double wholesale[20] = {0.0}; double retail[20] = {0.0}; string searchTitle; int main() { // Declarations … |
can anyone help me how can i get the time at my desktop using <dos.h> | |
So i've been working on this program for a couple of days and just cannot figure it out for the life of me. I'm fairly new to classes and methods so I think that's probably why. Here's the lowdown of the project: > New electronic monitors are being installed on … | |
Forgive me if the title was even worded properly. What I'm trying to accomplish is to be able to create an unlimited number of objects for use by struct and quickly realizing that my thought process on how to achieve that is wrong. Here's the related code: struct person { … | |
I'm having an issue in creating my "Horse Race" program. I'm getting error "subscript requires array or pointer type" in my while(winner==false) loop at if(q==null) { tick[q]++; } and for(int q=0; q<numhor; q++) { if(tick[q]==10) { ... } } in addition to several places in my separate class files, even … | |
Not sure if I posted correctly. I am trying to do a bubble sort on a 2D array. I want to sort the array by columns. I get it to compile but it doesn't run correctly. #include <iostream> using namespace std; int main() { int array[10][10]; int col, row; cout<<"Enter … | |
As you know how avl should be balanced after deletion of a node, I'll get to point. For starting, Im considering deleteing a node with no children. For Example a Tree: 10 / \ 5 17 / \ / \ 2 9 12 20 \ \ 3 50 Lets say … | |
> Write an EFFICIENT program that reads in the name of a file containing positive integers that are less than 1,000,000. The program prints out the integers in the file, in the order that they appear, eliminating duplicates. So if the file contained 8 3 1 9 2 8 15 … | |
Hello, I'm working on an assignment and I'm having a bit of trouble. Around **line 12** it calls a **world->getOrganism(int,int)** However no matter what value of grid[][] I return it crashes. The if() should be checking to see if that particular grid cordinate is of the ant class. (dynamic_cast<ant *>(world->getOrganism(i, … | |
how to write a program to stimulate a bank transaction. there are two bank accounts : checking and saving. first, askk for the initial balance of the bank accounts ; reject negative balance, then as for the transaction ; option are deposit, withdraw, and transfer. then ask for the account … | |
This program works fine, but I need help with the date validation. I have a regular expression that checks for dash patterns and integers and that is all. Is there some way I can add a date validation that can check for improper dates and leap year? If so, is … | |
| #include <iostream> #include <string> #include <iomanip> #include "mainmenu.h" using namespace std; string bookTitle[20] = {0}; string isbn[20] = {0}; string author[20] = {0}; string publisher[20] = {0}; string dateAdded[20] = {0}; int qtyOnHand[20] = {0}; double wholesale[20] = {0.0}; double retail[20] = {0.0}; void main() { // Declarations for function … |
my code freezes whenever i enter 12-19. #include <cmath> #include <iostream> using namespace std; int main() { int multiples; int answer; int square; int cube; int num; cout << "Please enter a positive number less than or equal to 20: ";\ cin >> num; do { if(num >=20) cout << … | |
I need help with the editbook part on serendipity bookseller part 8 and the deletebook function as well this is what I have so far: | |
I'm trying to build libgd and can't seem to get past this error. It configures without error but when I go to make Install the below error occurs. Would anyone know how to get past this? WinXP, MingW. Thanks. gdfontg.c:4380: error: variable 'gdFontGiant' definition is marked dllimport gdfontg.c:4380: warning: 'gdFontGiant' … | |
Hey there, my code is nearly perfect, but I need help with my input for a value. here's the snippet of my code: cout << setw(15) << right <<"$" ; double Amount; input >> Amount; cout.setf(ios::showpoint); cout.setf(ios::fixed); cout.precision(2); cout.width(8); input.ignore(); cout << Amount << endl; i know that input puts … | |
how can we use callback functions in handling events using ActiveX control? Can any one explain with simple example Thanks in advance.. | |
Hi! As the headline suggests I am getting the following error message: First-chance exception at 0x00d690d1 in NyÃ¥r.exe: 0xC0000005: Access violation reading location 0xcccccccc. Unhandled exception at 0x00d690d1 in NyÃ¥r.exe: 0xC0000005: Access violation reading location 0xcccccccc. #include<iostream> #include<cstdlib> #include "Participantsregistryhead.h" int main() { _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); ParticipatorRegister Registry; Registry.typeOut(); … | |
I have a Code::Blocks project that includes a perl script which creates a c++ source file containing a linked list; the linked list is built by parsing special comments that may be included in all of the project's other .cpp files. The script is desinged to automate the creation of … | |
Hi all, We have just upgraded our btinternet router, and they gave me the old one to experiment with. The router is identical to [this one](http://upload.wikimedia.org/wikipedia/commons/7/71/BT_Home_Hub.JPG). A friend thinks a script would have to be written in C++. The router has all of its config stuff on a web interface, … | |
Can anyone help me with this pratice question: 33 31 11 47 2 20 24 12 2 43. I am trying to figure out what the contents of the two output lists would be after the first pass of the Merge Sort. The answer is supposedly: List 1: 33 11 … | |
can u please help me to make this program..a program that decide and accept y for yes and N for no.y to repeat the process and no for the exit of the program.. ASAP PLS..TENKS | |
I am trying to write a function that helps to find a smaller 2D array in another one . I wrote it but the problem is that it always finded the array when it didnt exist . the only thing I want is that to say does it exist or … | |
Develop a telephone directory which is capable of doing the following: 1. Insert a contact 2. Delete a contact 3. Edit an existing contact (changing or modifying a record) 4. Search a contact (and display complete record on screen) a. Search through first name b. Search through last name c. … | |
Hi - I'm trying to make a databse with the produkts from McDonald, but i can't figure out how. It is supposed to both read and write. Here's what i've made so far... Hope U understand: #include <iostream> #include <fstream> using namespace std; struct Menu { char navn[50]; int pris; … | |
Hi there I need help writing a data structure to hold and assign data to a particular unique ID. I think I want an vector of structures: struct Data { int ID; double latitude; double longitude; int speed; int altitude; }; I receive messages in the above format, they can … | |
How should i implement the very basic singly linked list in C++, i am having a paper in just 20 days and i dont know a bit about this stuff,,, How to add data to it ,, as there is only one data item in single linked list and one … |
The End.