49,757 Topics

Member Avatar for
Member Avatar for DelilahDemented

I'm trying to read information from a text file and populate an array of structs using a pointer. I keep getting an error and I'm not sure how to fix it. Any help, comments, or tips are greatly appreciated! Thanks in advance for your time and help! error: request for …

Member Avatar for Ancient Dragon
0
379
Member Avatar for klharding2

Okay I am SO new to C++ and I'm trying to write a code where the user can input the file name to read from. I have looked at a million forums but it doesn't seem to work for me. The program compiles but it is not getting the correct …

Member Avatar for deceptikon
0
480
Member Avatar for jerlisacoleman

Need help with this and my professor is teaching way too fast. You are going to convert feet and inches or pounds in this program. You will give the user the choice of converting feet and inches to centimeters *OR* pounds to kilograms. With the correct answer you will also …

Member Avatar for NathanOliver
0
356
Member Avatar for dellat

Please tell me where it goes wrong as the following C++ code gives the error message: **addem.cpp:5: error: too few arguments to function int addem(int, int)** `#include <iostream> using namespace std; int addem(int, int); int main() { int x=5; int y=2; int z; z = addem(x+y); cout << "The value …

Member Avatar for dellat
0
380
Member Avatar for RonKevin

//Ok so here's my plan so far please check if i'm on the right track guys! thanks! #include<iostream.h> #include<cstring.h> #include<conio.h> struct BuyerInfo { int id; string fn; string mn; string ln; string ad; };BuyerInfo info; void menu() { cout<< "\n================================================================================"; cout<< "\t\t\n WELCOME BUYER!Please fill in the following\n"; cout<< "\n================================================================================"; …

Member Avatar for RonKevin
0
232
Member Avatar for alfredgg

I am trying to make a calculator in C++ but I keep running into errors. Please help me. Here is the code: #include <iostream> #include <cmath> #include <string> using namespace std; int main() { //what the variables are double calculation; double sign; double number1; double number2; //the questions cout<<"Enter a …

Member Avatar for alfredgg
0
249
Member Avatar for Stagnant

So my program uses the list template as the towers and the values in them are disks. I used the push and pop methods with loops to display changing values due to user input. > Rules of the game: > 1. All disks are stacked into an initial tower. > …

Member Avatar for WaltP
0
3K
Member Avatar for aaal

Hello, main.cpp #include <iostream> #include <string> #include <sstream> #include <cstdlib> #include "Triangle.h" using namespace std; int main() { Triangle myTriangle; int side1; double side2; double side3; string input; char ch; do { cout << "Triangle ADT Program" << endl; cout << "Enter the side lengths :" << endl; cout << …

Member Avatar for aaal
0
197
Member Avatar for ConfusedLearner

I do not understand were I went wrong. 1st is this line: (it is saying that this (;) Error: excepted an expression) 2nd is this line: cout<<"\nRadius is " << radius << set(8)<< "PI is" <<PI; something is wrong with the second (<<) // Program illustrating the use if #defines …

Member Avatar for Lucaci Andrew
0
222
Member Avatar for zoomblue2000

Hi guys, I am trying to write a code to read from a .dat file and then store its contents in an array of word format so that it can be used in a another funciton. But have no clue how to go about it can cany one help. The …

Member Avatar for zoomblue2000
0
285
Member Avatar for vicky30312

Im in a programing class and my teacher had a heart attack and is away, the supply knows nothing. The project is to create a program using a swtich structure to calculate the weight on a specific planet. I have no i idea if i am doing this right. Can …

Member Avatar for Ancient Dragon
0
273
Member Avatar for markwiering

**Hello everybody!** I made a program which is able to calculate your age. You can find the source code below this text. There is already posted an article like this on http://www.daniweb.com/software-development/cpp/code/331349/c-code-for-simple-age-calculator But, my program is: **- Without mistakes**, it doesn't give your computer wrong instructions. **- More accurate**, because …

Member Avatar for markwiering
0
1K
Member Avatar for mbasit

The New Wave Computer Company sells its product, the NW-PC for $675. In addition, they sell memory expansion cards for $69.95, disk drives for $198.50, and software for $34.98 each. Given the number of memory cards, disk drives, and software packages desired by a customer purchasing a NW-PC, print out …

Member Avatar for mbasit
0
320
Member Avatar for RonKevin

Grocery Point of sale system... -advises only, thanks! So here it is: 1. The system should have an ability to store up to 100 records. 2. Provide the following POS Application: a. Scan Buyer's Items-i'm not really sure about this one..is this where i'l input the barcodes of the //items …

Member Avatar for RonKevin
0
356
Member Avatar for linabeb

hi everyone...i have been searching for days on creating a dll files using dev c++... actually i know how to create the dll files but i dont know how to use it...u got what i mean right?? ^^, please2....anyone help me...i really want the tutorial..i would like to create a …

Member Avatar for linabeb
0
197
Member Avatar for kera.alexander

how do i create an array of size 20 to accept grades for 20 students.Fir each student determine whether they pass or fail.the pass mark is 50%,all grades are recorded using real numbers.

Member Avatar for WaltP
0
91
Member Avatar for SAM2012

Hi, I have a discrete event simulator for m/m/1 queue. How can I have a program based on priority queue using M/M/1 model. PLEASE help me to have an idea about priorities and thier implementations

Member Avatar for SAM2012
0
308
Member Avatar for jdh1231

Hi. I am doing this program checking & comparing the speed of cache of two loops below, and I keep getting error "Automatic allocation exceeds 2G". I am trying to use dynamic array to make this work. Can anyone help me using Dynamic array? I am little lost on that. …

Member Avatar for WaltP
0
112
Member Avatar for poloblue

Hi, I don't get the meaning of this question: change B and C inheritance to public and protected respectively This are the classes and their inheritances that I have: class A { public: int a; A(); //default constructor A(int, int, int); //another constructor ~A(); //destructor void printA(); //printA protected: int …

Member Avatar for NathanOliver
0
139
Member Avatar for triumphost

How can I figure out where words intersect in the following? AAAA#BBBB .#.##C##H .#.##D##I .#...E.#J ##.##F##K ###..G..L '#' represents the black spots in a crossword where you cannot fill in. '.' represents the spots with missing letters that need to be filled in. I've read the puzzle into a vector<string> …

Member Avatar for deceptikon
0
400
Member Avatar for Neild

I'm a starter in C++. Can someone explain the output of this program ? # include <iostream> using namespace std ; void number ( int a) { if( a < 0 ) return ; else { cout<< a <<" "; number(a - 1); cout<< a << " "; } } …

Member Avatar for triumphost
0
108
Member Avatar for logic20

alignas (since C++11) alignof (since C++11) and and_eq asm auto(1) bitand bitor bool break case catch char char16_t(since C++11) char32_t(since C++11) class compl const constexpr(since C++11) const_cast continue decltype(since C++11) default(1) delete(1) do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable …

Member Avatar for Ancient Dragon
0
224
Member Avatar for sampsont

Is method B any faster than method A below? I have legacy code written with method A and I need to know if there would be a performance increase if I modified it to use method B or is it just semantics? **Method A (Using pointer)** for(vector<TriggerAlgorithm*>::iterator it = _pTrigs.begin(); …

Member Avatar for Ancient Dragon
0
210
Member Avatar for Bumpehh

so i decided to try sfml, and i used the sample from the website to see if its working. heres the code //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <SFML/Window.hpp> //////////////////////////////////////////////////////////// /// Entry point of application /// /// \return Application exit code /// //////////////////////////////////////////////////////////// int main() { // Create the main window …

Member Avatar for m4ster_r0shi
0
153
Member Avatar for ArYan.AgRwl
Member Avatar for crackerjr

Write an application that prints a summary report for a poultry farm. The farm has seven (7) chicken coups each numbered 1 to 7. When a farmer collects eggs each morning and evening, he records the coup number and the number of eggs collected from the coup. The data for …

Member Avatar for deceptikon
0
122
Member Avatar for Abhineet.Ayan

Hi All, I am implementing a recursive registry delete using RegOpenKeyEx, RegDeleteKey and RegEnumKey. **Problem::** Though the code works perfectly fine for Vista x86/x64 and Win 7 x86/x64 but fails on XP for some keys in HKCR **Problem Area::** HKCR\Installer\SomeKey **Error Code::** 87 (INVALID_PARAMETER) **Weird Behaviour::** Deletes the key the …

Member Avatar for Abhineet.Ayan
0
1K
Member Avatar for ananDE

Hi everyone, I am a student,quite new to C++. I am working on my thesis right now. Here is my situation, I have an algorithm for my thesis topic and I tried making an example of this in C++ and it works fine with a console application. But I am …

Member Avatar for ananDE
0
227
Member Avatar for schutzk21

So I need to write a program where the user tries to guess a magic number. The only thing that I do not know how to do is set the max. amount of guesses to 5. This is what I have so far. Can someone please show me how to …

Member Avatar for np complete
0
414
Member Avatar for shabaaz

I need help to write this program. I dont understand how to do a+bi. Please Help Thank You.

Member Avatar for np complete
0
152

The End.