Beginners - April 2018 (Page 19)

Need help with understanding how to code
 
I'm at a total loss. I understand individual pieces. I know how cout, cin work. I know how variables, functions and data types work. I've coded programs before....
[9 replies] Last: Hello crackedice, I think using namedpsace:std is required at this p... (by Handy Andy)
Changing class stats in another function?
 
So I'm working on code to allow for multiple pets to be played with...I've gotten almost to where I need to be, but I still have two more problems. I need a ran...
[1 reply] : but I still have two more problems Optimist! :-) I’ve added comme... (by Enoizat)
rng works on mac, but not windows?
 
I made a class that generates random SSID. and this is part of the function: int Student::generateTokenType() { std::random_device m_mt; std::uniform_...
[5 replies] Last: pick a pseudo-random number engine and seed it with a reasonable rand... (by Peter87)
defining function to find match
 
Write your question here. i defined the first function to find matches but i need to change it into the second function provided. it will search through a vect...
[2 replies] Last: std::vector<const Person*> AddressBook::matches(std::string prefix) co... (by elayyan8)
Deleting item from prefetch / random characters behind filename
 
Hey, i'm just wondering if theres a specific way to delete items (in my case .pf files) that are named randomly? The files save like this every time chrome.e...
[2 replies] Last: I figured it out this way: { WIN32_FIND_DATAW fd; HANDLE hF... (by Moobman)
Structs and Functions, calculating min, max, average and proving true
 
Hello, I am having great trouble understanding exactly what to do with the assignment below. I have created some sort of code, based on my assumptions that I ...
[no replies]
by aaroz
VBA/Pascal to C++
 
Hello, I recently did programming at school and what I thought was C was actually VBA/Pascal. I tried to change the VBA/Pascal to C++ but I couldn't does anybod...
[9 replies] Last: Why not use p2c? Anyone used that recently? (by zaphraud)
Program keeps closing after the user inputs desired file name
 
I am trying to write a code that prompts the user for am input file name and opens it to display it's contents. My problem is that when ever the user inputs som...
[1 reply] : It's probably not opening the file, going into your else statement and... (by tpb)
how to print a matrix of 9x9
 
Hi , I have studied the arrays section here. Now I am trying to print a matrix that is retrieved from a file (map.txt) which has various numbers. It is a 9x9 g...
[4 replies] Last: A vector is basically a thin wrapper over an array. A vector of vector... (by Ganado)
enter and isspace
 
I've begun reading a bit about c type string functions and I've come across this strange behavior in my code: #include <cctype> #include <iostream> using ...
[3 replies] Last: The reference page that you quoted is for the std::getline function wh... (by Peter87)
Dynamic array with random value - Sorting + value problem
 
I have to make a program that generates an array with random values < 50, finds all groups of 3 numbers whose sum is divisible by 25, and then outputs those gro...
[2 replies] Last: to sort you may want to look into sort http://www.cplusplus.com/refer... (by d1g1talarts)
Issue passing 2-D array into a function
 
I'm having issues passing a 2-D arraying a function. I get an invalid operands to binary expression . #include <iostream> using namespace std; vo...
[1 reply] : cout<<check(board, 3)<<endl; check(board,3) is a function call... (by Repeater)
Please help fix
 
I'm working on a program that is suppose to display the amount of reward points a customer has accumulated based on their membership type and amount of monthly ...
[3 replies] Last: Hello Russderp, Yesterday when I wrote the last message I was interru... (by Handy Andy)
Reading from file and output is a large blank space
 
This code reads 26 names from a file. When the user enters 1 as their menu choice, the output is a large blank space, almost as though the names are there, but ...
[6 replies] Last: @Thomas1965, Thank you. Point noted. Somewhere I got the impression t... (by Handy Andy)
resolution operator
 
I am new to C++ and have seen the following code fragment in numerous places and have been unable to make sense of it or find any source on the net to expla...
[5 replies] Last: Thanks for all the replies giving me a better understanding of scope ... (by appagio)
Recursion function
 
Writso i am trying to make a recusive function to calculate the number of even functions in an array. The function takes the array, starting point, ending poin...
[1 reply] : Hello Echelon22, You should compile you code before posting. I have 2... (by Handy Andy)
compare the input and the Top of stack
 
How to compare the input and the Top of stack? if top value < input value, then input value allowed get into the stack
[1 reply] : http://www.cplusplus.com/reference/stack/stack/top/ (by lastchance)
operator overloading
 
#include<iostream> class Complex { public : Complex (double real=0, double imag=0): _real(real) , _imag(imag){} double getReal()const {return _real...
[2 replies] Last: yeah but even with the change in container container2 was not affected... (by moo2401)
Overloading operator and Inheritance is confusing me!
 
I am trying to make a program that has one derived class and one base class. This is the base class header: #ifndef Ship_hpp #define Ship_hpp #include <stdi...
[7 replies] Last: should I put the virtual method in public or private? Both print met... (by closed account E0p9LyTq)
Keylogger (Educational purposes)
 
First of all this is for educational purposes nothing more! Secondly this is NOT MY CODE this is from random youtube video! So i have a few questions about it (...
[3 replies] Last: Thank you FurryGuy and Jlb for help i understand all now and for diffr... (by Bakenhuman)
April 2018 Pages: 1... 1718192021... 25
  Archived months: [mar2018] [may2018]

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