Beginners - August 2017 (Page 8)

Default Argument Function help
 
So simply I am new to Default Arguments and am having a bit trouble onto why this particular program is not working the way I intended to. I did it two ways, on...
[3 replies] Last: Awesome, thanks guys! (by Bayan Khorshidi Berkeley)
by Kuluoz
Disassemble in C++
 
I have use c++ in ubuntu 16.0. Now i want to include disassemble function in that program. is it possible? if possible how to import exist program ?please hel...
[3 replies] Last: Hi Guys, Actually , what i need ? i want to write c++ program and i u... (by Kuluoz)
by GSid
input variable string or integer
 
i am struggling to create a program which takes multiple inputs and determines if they are a string or a number than outputting weather the input is valid or no...
[3 replies] Last: I use this all the time: #include <sstream> #include <stdexcept> #i... (by Duthomhas)
About Companion Website of "Absolute C++" Walter Savitch
 
Hi guys. I have bought the book "Absolute C++" for my self-study. The book provides the code for 12-month access to digital resources including tutorials, sourc...
[1 reply] : I am not a fan of Pearson. Alas, it is unlikely anyone here can help. ... (by Duthomhas)
Transfer cout statements to main
 
Hello! I'm trying to write a program that uses selection sort, linear search, and binary search. I am not allowed to use cout statements in functions other than...
[7 replies] Last: @jlb Sorry I didn't elaborate, it's just the assignment requirement. I... (by hihihello)
oid function "expected initializer before void"
 
I am getting this error "expected initializer before void" Please help!!! #include <iostream> using namespace std; struct Person { char name ;...
[2 replies] Last: Line 39 you don't need two function definitions, so take that one out.... (by arbwok)
Simple pointer issue
 
when i try to read the carbon n the hydrogen, it appears a lot of error messages.in a previous program I did the same but instead of new int was new int , is th...
[1 reply] : The pointer needs to be dereferenced to access the integer which it po... (by Chervil)
push_back() to vector not working
 
My names Rob and I'm a newbee to programming so I apologize if my problem is extremely apparent and I am failing to see it. I am trying to have the program...
[4 replies] Last: Thank you for all the help! Everything works as needed now. (by ruper33)
by Tobruk
Code snippet permanently changed the colour of the console text even after scrapping the code
 
Hi, I used a code snippet for manipulating TextAttributes from an article on this site. The code is here: http://www.cplusplus.com/articles/Eyhv0pDG/ I wo...
[3 replies] Last: That is not a well-written article. You have to remember and rest... (by Duthomhas)
by Tobruk
Refer to the object using class function
 
Hi, I was curious whether or not I could do something like this: void some_class::foo() { self.var = 1; } instead of doing this: void some_class::foo...
[2 replies] Last: Exactly what I wanted! Thanks :) (by Tobruk)
UVa 700
 
Hi, this is the solution for UVa 700, I'm not sure why it is returning Wrong Answer on the judge all the time, could someone tell me what I'm missing? It works ...
[3 replies] Last: You may just be lucky on your own compiler too. Only global variables ... (by Duthomhas)
Invalid Base Class Error
 
I've a base class declared in header file named A which contains two pure virtual functions along with few normal functions that are not defined. I create anoth...
[3 replies] Last: I just had to move the array initialization into constructor (by jitendra2896)
Composition: "Composition is dynamic binding (run-time binding) while Inheritance is static binding (compile time binding)"
 
I learned that "Composition" is used in classes when complex objects are build from smaller "Object composition". Composition models a "has-a" relationship so p...
[3 replies] Last: In C++ you have a choice of how to do composition. You can either st... (by Peter87)
by GSid
nested for loops to find number of digits
 
i am trying to make a program that tells the number of digit/letters in each command line argument eg. if 'hello bruh 4444444' is entered the program will put o...
[6 replies] Last: > /C string length function replaces inner loop and std::transform ... (by JLBorges)
by pizza
std::sort / sorting using member function
 
I have trouble with std::sort using a member function as the third parameter. below is a part of my code that I need help with... I am a beginner and quite new...
[5 replies] Last: Thank You VERY VERY MUCH~~~~~ (by pizza)
I have to create a program that converts seconds to proper time format
 
Hi team, I need to create a program that firstly accepts entries from the user in the following format hh mm ss two times, then the program converts these entr...
[1 reply] : Easiest way would to use localtime, but I am not sure if you are allow... (by Thomas1965)
Another simple Function Question
 
Hi there, I have a simple function question. We stumbled upon "Static Local Variables" and I am confused on what this is supposed to do. I thought making the fu...
[5 replies] Last: Make sense now, thanks everyone for the help. (by Bayan Khorshidi Berkeley)
Simple text file vs MS Access for a database?
 
Hi. Let's say I have a program, a user login system, a place where members can sign in and new users can sign up. My program expecting to have more than a thous...
[4 replies] Last: Thanks. (by Thomas1965)
by GSid
For loop that counts letters in arg
 
I have to make a for loop which counts the letters/digits in the first argument,eg. if i type 'what' 4 will be displayed. currently when i input what i get 0 ...
[3 replies] Last: Thanks mate you are a life saver yeh the problem was with me not putti... (by GSid)
The product of those elements of an array that are smaller than 6
 
I was required to write a program that would insert 10 random numbers from [-10, 23] into T and output a sum of them all. Now I should write it so that it o...
[11 replies] Last: But it would be. A 7 * 0 * 1 produces 0 just like the 7 * 0 does. A v... (by keskiverto)
August 2017 Pages: 1... 678910... 17
  Archived months: [jul2017] [sep2017]

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