General C++ Programming - November 2015 (Page 18)

program to print stars
 
// program to print the star (*) as show bellow : #include <iostream> #include <iomanip> using namespace std; int main() { int s, c,i; for (s = 20, c =...
[1 reply] : I tried to run your code, and this happened: * ... (by MrHealYoGirl)
Can anyone help with this issue?
 
How could I apply input >> ws into my program? The program works perfect but I wanted it to display like this EX: Jake Miller,712-9881 How could I go about ...
[11 replies] Last: What you can do to keep the data is to build a structure of this form:... (by MrHealYoGirl)
by vinny1
My loop will not exit propery
 
So I have switch case loop where I must use 10 and 99. 10 is one of my cases and 99 is how you exit the loop. However when the user enters 10 or 99 it reads 1 ...
[2 replies] Last: oh thank you (by vinny1)
Pointer Function inquiries.
 
Hello, I need help to implement a pointer function for my program, but I lost the class material to finish it. This code needs to be able to run with the multip...
[2 replies] Last: At the end of this article: http://www.cplusplus.com/doc/tutorial/poi... (by closed account 48T7M4Gy)
by Sh0es
ArrayList Class Throws Segfault on Copy Ctor Call
 
I don't see any obvious problems with this code. #ifndef ARRAYLIST_H #define ARRAYLIST_H #include <iostream> #include <string> #include "ListExcepti...
[1 reply] : Remember that is a constructor so size , space and data has not b... (by Peter87)
design a class with data members and member functions
 
Hi, I am just a beginner to c++. I have got a following question in the written test of an interview. Someone please do help me. It's very urgent for me. A...
[2 replies] Last: Sorry. If this is an interview question then it's for you to answer, n... (by dhayden)
by vinny1
Having trouble with some of my cases
 
I'm having trouble finishing off my code. My case 2, 5, and 10 are not quite working In my case 2 it works but it does not give the right output instead of gi...
[2 replies] Last: For example instead of hearing = 7 it gives hearing = Length = 0 You... (by kbw)
well ,this is a program to find whether the given no is PALINDROME,its not giving the correct output.Please HELP!!!!
 
Write your question here. using namespace std; #include<iostream> #include<math.h> int main() { int p,r ,n,t,sum=0; cout<<"give any no. ,p="; cin>>p...
[2 replies] Last: PLEASE use the code tag using namespace std; #include<iostream> #in... (by JayhawkZombie)
Variadic Templating
 
This is more of a concept question: I've learned enough C++ that using typical stuff that people do in the their first year of programming doesn't satiate my...
[3 replies] Last: Some great examples! Thanks! I like the connection to the standard l... (by JayhawkZombie)
How to print a diagonal of numbers in stars?
 
------------------------------------
[12 replies] Last: Probably because he is trying to hide the fact that someone else did ... (by MikeyBoy)
Base 10 to Base 8 program
 
Hi everyone. I am trying to create a program to convert numbers into base 8 using a function but it outputs 0 every time. I cannot figure out why. Can someone h...
[1 reply] : Can you please use the code format tags to format your code. I've take... (by kbw)
by Eric58
I need help with this
 
Write a C++ program that will calculate an average of class test scores and a frequency distribution. Input to the program will consist of integer scores stored...
[1 reply] : Please post what you have done so far and put the code in code tags ht... (by TarikNeaj)
Queue Input Problem Postup
 
Hi, I'm having trouble getting user input to work properly with my Queue. The queue is working as it should. However, I cant get the user input right. Any help...
[no replies]
Calculating different ways
 
Hey guys, I have to write a program which calculates the number of possibilities how an amount of bottles can be placed in boxes which have different capaci...
[4 replies] Last: Could you elaborate on this a bit more? How would I check that all po... (by dhayden)
by nwd3
Circular Queues
 
Hello I am trying to create a setCapacity(unsigned newCapacity) method for circular queues. I was given a test that this method has to pass and it is failing on...
[1 reply] : sorry I don't know how to use code tags Then set your troubled mind ... (by MikeyBoy)
List sorting -- how to compare strings?
 
Hello, I'm having a bit of trouble on sorting a list of multiple elements, based on the full name of a person. The structure upon which the list is made: stru...
[4 replies] Last: Thanks for the help, I spotted more syntax mistakes on the code, such ... (by MrHealYoGirl)
by Blythe
Looping shapes.
 
So my code is here: http://cpp.sh/7pfnv Just ignore the rest and look at my S/Square shape. Variable 'a' refers to the number of shapes and variable 'b' refer...
[1 reply] : For some reason you are sorting a and b. Don't do that. You need two ... (by Duthomhas)
Help Please!!
 
Why is answer undefined?? #include <iostream> using namespace std; bool validMonth(int number); bool validDay(int numb); int main () { cout...
[3 replies] Last: Take a really good look at this http://www.cplusplus.com/doc/tutorial/... (by ShiftLeft)
Need Help on...
 
I need help on 1. Saving a list of parts to a text file. 2. Load the parts from a text file. This is part of the code i have now but just unsure how to sav...
[1 reply] : Please use code tags when posting code, to make it readable: http://w... (by MikeyBoy)
by benija
Writing coffee shop simulation
 
I'm having a few issues with this coffee shop simulation. Every time I run it it'll go till i get to the menu and then most selections I make give me a blank co...
[4 replies] Last: Hopefully someone can see what I'm missing. The first thing you're ... (by MikeyBoy)
November 2015 Pages: 1... 1617181920... 26
  Archived months: [oct2015] [dec2015]

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