Beginners - September 2019 (Page 5)

Unresovled External using Stack template
 
Hi all I've written this program to convert infix expressions to postfix. it works well for any expression however I wanted to optimize it using a stack templat...
[3 replies] Last: http://www.cplusplus.com/forum/general/113904/#msg622073 (by ne555)
How to do this problem?
 
double a=0.00; switch (selection) { case 'p': cout << "Pentagonal Pyramid Calculator\n"; cout << "Valid range [2.00 < edge length < 500.00]"<< endl; cout...
[4 replies] Last: I got it. Thank you (by hein harry thu)
s
 
ddd
[8 replies] Last: 2013 to 2019 - not the sharpest tool in the tool box then. Moss on a w... (by salem c)
by danc2
Cin.ignore **CODE PROVIDED**
 
Cin.ignore() is acting very weird. If I input the following input sequence to this program: 2 5 10 {extra input requested here by cin.ignore()} 2 12 I ...
[3 replies] Last: @zaphse and @Handy Andy Wow! Thank you so much to the both of you. ... (by danc2)
Infix to Postfix conversion using Stack - Problem in pop function
 
Hey everybody, following is my code, #include <iostream> #include <string> using namespace std; #define MAX 100 class Stack { char arr ; int top...
[1 reply] : The issue is with the loop on line 100, it should be this: while ((... (by zapshe)
Out of range at memory location problem
 
when I use scanf and printf instead of using cin and cout, I have an error like "out of range at memory location" on outputLetterList.push_back(letterList.a...
[2 replies] Last: Hello ekdlsks7437, I tired working with your program. I was so distra... (by Handy Andy)
duplicating dynamic arrays
 
I need quick help with the output of my code when I try and duplicate my dynamic array. I'd rather just show instead of tell and give my current code. Here...
[5 replies] Last: You forget the line of code which allocates memory, the line of code w... (by Thomas Huxhorn)
Hello, Could someone help me.
 
In the Programming principles and practice using C++ book Chapter 7 recovering from errors. I am very confused about the exception. class Token_stream{ p...
[8 replies] Last: A risk every time someone says 'never'. Absolutes of artificial (leg... (by jonnin)
concatenate vector returned from function
 
hello! I have this code: #include <vector> class Foo{ public: int n; std::vector<Foo> subdivide(){ std::vector<Foo> v(2, Foo()); ...
[3 replies] Last: thaaanks! I'm not really used to templates, so besides the solution to... (by Stauricus)
Linked List
 
Hi! I'm making a linked list where it contains 6 elements and wherein if i roll a dice, starting from the first element, going to the element according to the r...
[2 replies] Last: @salem c yes thats exactly what i mean. sorry i didnt saw that comme... (by OlaveraLuffy)
How can I cause program to crash and print an error message?
 
I made a class and I need to be able to crash the program and print an error message if a certain condition is met inside the default constructor. Something...
[3 replies] Last: Personally I wouldn't intentionally cause a program to crash, I'd info... (by George P)
HEEELP !
 
i have been given task in university and i still have no clue how to solve this :( Given a natural number n. Print out the number obtained from the given nu...
[7 replies] Last: then i was on right path :o now next part is to get the algorithm x_x (by Sarahxx)
Function Call Not Working
 
I have a function that I set up in the implementation file that removes any duplicate strings, and everything is working with it when called from the client pro...
[7 replies] Last: I see where are going with all this. I got the same impression with th... (by stoneJax)
by cash
finding the sum of array class
 
I'm confused on how I can find the sum of the array DollarAmount sum(DollarAmount a , int size){ // calculates the sum of the Array of dollars Dolla...
[1 reply] : DollarAmount s = 0; or C++11 DollarAmount s { }; s += a ; ... (by George P)
Fstream: using ofstream but doesn't creat a file
 
Hello everyone! I'm using Linux ubuntu trying to create a file. But this way doesn't work here. How to do it right? or configure #include <iostream>...
[4 replies] Last: I had just compiled it. And to create the file have to run that was m... (by Null server)
Simulations with 2D arrays
 
Please be as verbose and patient as possible. I am still very new. Problem: A local government organization has been testing a new biological triggering devic...
[4 replies] Last: As of right now it is just printing so many spots and then failing. I ... (by XboxOne2019)
while(istream) iterates one too many times
 
I'm trying to use a while loop to read each line in an istream. The loop body is executed one more time after reaching the last line in the stream. How can I ...
[2 replies] Last: Hello MattJ812, Of course it is. It would help if you provided more o... (by Handy Andy)
How to output data from text file? (Student Report Card Program)
 
I'm currently writing a program that consists of displaying students' ID, Name, Course, Credit, and Score. The data is all in the text file. "StudentRecords.t...
[2 replies] Last: your output may be stale. The version posted will not compile, so wha... (by jonnin)
Should I use std::cout or just cout alone
 
I always here people say use std::cout,but most programs I see use cout without the std. I am really confused, which can I use?
[3 replies] Last: Starting in C++17, you can also combine using statements snugly into o... (by Ganado)
how to make program for car rental
 
Any one here who can help to create program for car rental please guide me?
[6 replies] Last: [quote=Handy Andy]As it has been pointed out to me things like "std::m... (by George P)
September 2019 Pages: 1... 34567... 13
  Archived months: [aug2019] [oct2019]

This is an archived page. To post a new message, go to the current page.