General C++ Programming - September 2015 (Page 13)

help - how to get values from different classes
 
Hello everyone, I am learning c++ and enjoying it a lot. Probably this is a very basic question, here goes anyway. Lets assume the following: class A{ in...
[8 replies] Last: If you want one piece of code, whether it's in a class or not, to have... (by cire)
the insert1() is not working please help
 
#include <iostream> #include<stdio.h> #include<string.h> #include<fstream> using namespace std; class movie { int movieno; char moviename ; float ...
[6 replies] Last: while(fin,ch=='y') is the same as while(ch=='y') Additionally your... (by MiiNiPaa)
Sorting from largest to smallest?
 
I want to sort this program from largest to smallest WITHOUT printing backwards, I want it to actually sort from large to small. #include <cstdlib> #include...
[2 replies] Last: In the heart of any "traditional" comparison-based sorting is comparis... (by MiiNiPaa)
Adding values from functions??
 
I need help adding up all the values that are inputted and returned by all the functions?? #include <iostream> using namespace std; //Function Declarations...
[1 reply] : Hi, please don't double triple post, the other one is better - you u... (by TheIdeasMan)
Very basic help. Calling functions in main
 
My assignment is to have the user input a number, and I take that number and perform the hailstone sequence on it. If it's even, divide by 2 and if it's odd, m...
[3 replies] Last: Your original code is having trouble because you call next() before yo... (by dhayden)
An I/O compiling error
 
So Im trying to use the code to read from two files with commandline generated names. And now it has one error. which is no matching functions for call for the ...
[2 replies] Last: Hi, A quick read of the reference manual might help a bit :+) http:... (by TheIdeasMan)
Capturing command line characters to source code
 
Hey guys, how do I capture what the user enters into the command line into source code? In the main method, if I have int main(int argc, char *argv ) ...
[2 replies] Last: thank you! (by MooseInTheSack)
Help with Command Line Arguments
 
Hey guys I have an assignment where the following will occur: The user will input on a command line: ./a.out inputFile1.txt inputFile2.txt inputFile3.txt ...
[1 reply] : #include <iostream> #include <fstream> #include <string> int main( i... (by JLBorges)
Counting the number of vowels
 
In my programming class we were given a problem to do, which is to prompt the user to input a sequence of characters and output the number of vowels. I did all ...
[2 replies] Last: Presumably you're trying to get it to work in main before you break ou... (by cire)
C++ (calculating total number of grains)
 
There is a story of the inventor of chess. The king wanted to reward him with riches, but he only asked for the following. One grain of wheat for the first squa...
[13 replies] Last: Ahhh yea you're right because you have to take into account 0 which is... (by Renthalkx97)
supervision
 
Hello, I would like make an application which would allowed me to supervise one 1st computer what is going on the 2nd computer. I was wondering maybe to laun...
[1 reply] : plz do not duplicate.. look in the other thread . (by Ericool)
Assignment Help
 
Write a complete program that will create a table as follows: The table will have 5 columns headed by: NUMBER, DIVIS3, DIVIS5, SQROOT, and FRTHROOT defined as...
[1 reply] : This is what I have so far..but it's only because the professor did mo... (by ProNewbie)
Locking a class member from modification
 
Hello, I want to be able to store data into a data structure, and at some point I want to be able to get pointers to certain elements so that I can reference...
[6 replies] Last: oh duh, didn't see that :) (by armstrhu)
How long a list do you want?
 
using namespace std; #include <iostream> #include <iomanip> #include <string> struct Node { int info; Node* next ; }; // recycleList -- recyc...
[2 replies] Last: I have no problem with compilation using gcc. What errors do you get? (by rich1)
Strncmp
 
Hello, having trouble implementing a strncmp function. Full description is here: http://www.cplusplus.com/reference/cstring/strncmp/ #include <s...
[6 replies] Last: Here is my current code: #include <stdio.h> #include <string.h> ... (by pacman169)
Binary tree level order traversal
 
Hello guys, I have a problem here. Given a binary tree, return the level order traversal of its nodes' values. For example: Given binary tree {3,9,20,#,#,15,...
[1 reply] : Basically there is 3 recursive methods for traversal in a binary searc... (by Ericool)
Need help...
 
Hi guys so I got this assignment and it is due tomorrow. I have been trying to get out of the mud and start working on it however I'm really trapped in a lot of...
[4 replies] Last: there is another thread about this assignment... Number one issues wi... (by Ericool)
Looping instead of exiting program?
 
1)When I use do/while, (QUARTERS >= 1000 ), how do I also make it do while the user input is characters instead of numbers. So if I type "blah" in the input, th...
[2 replies] Last: Replace these statements : if (QUARTERS < 1000) cout << " --> Input... (by Ericool)
[HELP in S.O.S game win counts]
 
Hello, my professor asked us to make an S.O.S game. My only problem is how can I check whether the p1 or p2 made an SOS. Can you give me a hint and also can you...
[no replies]
how to calculate no of elements in an array
 
for example char *a ={"abc","def","ghi"}; pls help me!
[4 replies] Last: you can also use std::array template. (by Ericool)
September 2015 Pages: 1... 1112131415... 21
  Archived months: [aug2015] [oct2015]

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