51,593 Topics

Member Avatar for
Member Avatar for jongiambi

I am trying to implement a function sameMonth from a class to compare two user entered months. My class is declared in a header file "Date.h": #include <iostream> using namespace std; class Date { private: string month; int day; int year; public: Date(); Date(string aMonth, int aDay, int aYear); void …

Member Avatar for vijayan121
0
288
Member Avatar for jongiambi

Can anyone help me with this constructor problem? In main: instantiate one date object (date1) using the default constructor just to see that the constructor works, print the month, day, and year of date1 using the getters get input from the user and use the setters to set the values …

Member Avatar for jongiambi
0
407
Member Avatar for blaisemcrowly

Hi guys I been programming in c++ for past 2 years and is fairly good with it. First of all I dont need the code or anything but need some resources which i can use to get the basic idea so I can start developing. Had been googling for the …

Member Avatar for rubberman
0
1K
Member Avatar for marius2010

So I'm beginner starting software enginering studies here condition: Given number n ( n<=9999) need to identify if this n is palindrom(ex. 7777,8228,0220...). Need to write in c++ language.thanks

Member Avatar for WaltP
0
369
Member Avatar for demingd

im writing a program that creates a dynamic array then input numbers(not exceeding 100). i used *new int* to create the array. im running into the problem that it only allows 21 numbers to be entered, then does sort,mean. could anyone explain where im going wrong setting up the array …

Member Avatar for WaltP
0
230
Member Avatar for triumphost

I had absolutely no clue where to post this but I figured since it crashes on the C++ side, I'd ask here. I have the following code: Java side (Loads My C++ DLL just fine.. Passes it a ByteBuffer so that I can write to that): import java.io.IOException; import java.awt.*; …

Member Avatar for triumphost
0
400
Member Avatar for Stpdoug

How can i draw a 1 line border or frame around code using an " * " , searching the net i have seen techniques using loops and various functions but i cant grasp the concepts being used, even a link to a indept tut on this would be a …

Member Avatar for Stpdoug
0
2K
Member Avatar for 88GzPopLock88

... The name of program is i think it is function and structured programming waa hard to explain ahmm.. if you input a number 1 temperature must be goes in program then after that i need to input an exit like "ARE YOU SURE YOU WANT TO EXIT?" then Y …

Member Avatar for Ancient Dragon
0
313
Member Avatar for 88GzPopLock88

![homework2](/attachments/large/3/homework2.png "homework2") ![homework3](/attachments/large/3/homework3.png "homework3") ![homework4](/attachments/large/3/homework4.png "homework4") ![homework](/attachments/large/3/homework.png "homework") The name of program is i think it is function and structured programming waa hard to explain ahmm.. if you input a number 1 temperature must be goes in program then after that i need to input an exit like "ARE YOU …

Member Avatar for Ancient Dragon
0
291
Member Avatar for DelilahDemented

I think I am getting bad data because I have my pointer doing the wrong thing, I just don't know exactly how to fix it. Any help is greatly appreciated! output: Number: 4669840 Name: Value: 3.76441e-039 Number: 4218312 Name: Value: 6.52879e-039 Number: 2686408 Name: Value: 6.52879e-039 Number: 128 Name: Value: …

Member Avatar for DelilahDemented
0
213
Member Avatar for xixi.li.7

I have a c# project to Create a console project named Cards that includes a struct Card, two classes Deck and Hand, and two enums: Rank and Suit. I attached a require output for this project. I have all my class but when I compile it only show the first …

Member Avatar for Momerath
0
252
Member Avatar for Grandiago

Hey! I have a problen. I'm a user of Turbo C++ yes, it's outdated. I know. LOL SO anyway, i'm supposed to create a program that reads a text document when ran. so I already have the text document named test.txt located on my desktop. but when i try to …

Member Avatar for WaltP
0
167
Member Avatar for klharding2

Hello, I'm trying to calculate factorials with my program, but it is only working for the first few numbers. It compiles fine, so I can't find the problem. Help please! Keep it simple, I am very new to C++ and programming in general. Here is my code: #include <iostream> #include …

Member Avatar for WaltP
0
92
Member Avatar for RonKevin

Hello I'm back guys! @npcomplete....can't do anything about it dude, its what we use in our school...and Im from the Philippines...when I master this compiler, i'll switch.. So here it is my work so far...Record of 100 Buyers..Please check if I did it right..It worked for me so..yea.. #include<iostream.h> #include<cstring.h> …

Member Avatar for WaltP
0
200
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
396
Member Avatar for semicolon

Hello, is there any good tutorials,library for downloading a file? I have an application that has a check for update button. please help me with my project

Member Avatar for waleed.makarem
0
123
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
491
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
363
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
385
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
234
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
252
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
200
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
224
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
293
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
278
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
330
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
360
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
203
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
310
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
115
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
141
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
427
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
110
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
228
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
212
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
159
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
124
Member Avatar for chamnab
Member Avatar for Ancient Dragon
0
121
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
229
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
417
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
154
Member Avatar for bdl365

So i'm having troubles writing the codes for the following exercise - Write a C++ program that does the following. 1. Asks the user to enter some positive integers. 2. Reads the positive integers from the user. 3. Stops reading the positive integers once a non-positive integer is entered. 4. …

Member Avatar for bdl365
0
2K
Member Avatar for zvjezdan.veselinovic

Hi everyone! I wanted to ask you guys a question. I was referred to this website by a friend of mine and I synced this account with my Facebook. I am new to computer programming, but I understand the beginning basics of C++ (i.e. cin, cout, void, float, vector, functions, …

Member Avatar for zvjezdan.veselinovic
0
215
Member Avatar for Peppercat101

So Ive googled this error but I cant find an explanation of why this is happening in my code.. Error: g++ -o code code.cpp code.cpp:8:17: error: too many decimal points in number code.cpp:8:43: error: too many decimal points in number code.cpp:1:1: error: expected unqualified-id before '<' token make: *** [code] …

Member Avatar for MandrewP
0
2K
Member Avatar for dmose13

So I'm just getting started in C++ and need some help. I want to right a program that inputs a number as n and then outputs digits 0-9 based on n. Also each row adds one more number until the last number is the number of digits of n. For …

Member Avatar for dmose13
0
140

The End.