General C++ Programming - October 2017 (Page 8)

c++ help
Traditional password entry schemes are susceptible to “shoulder surfing” in which an attacker watches an unsuspecting user enter their password or PIN numb...
Oct 18, 2017 at 1:14pm
[3 replies] Last: That simply doesn't work. int NUM ; // create array, contents unkno... (by Repeater)
What is the input?
I have a question that is asking what the inputs would have to be for inputs k, n, r to get the output of 2 3 4 5 from the code below. do you know the algeb...
Oct 18, 2017 at 8:07am
[3 replies] Last: cout << r*j<<" "; Since j increases by 1 each time through the loop,... (by lastchance)
g++ bug?
#include <map> #include <string> void TestTest ( bool call2ndTime, std::map <int, unsigned char> a = {{}}, std::map <int, std::string> b ...
Oct 18, 2017 at 5:42am
[1 reply] : Use a non-obsolete version of the compiler/library (GCC 5.1 or later).... (by JLBorges)
C++ selection sort issue
Hello.. I am currently having an issue with the SelectionSort function as it is not properly sorting the index.. Any help is appreciated! #include <iostream> ...
Oct 18, 2017 at 3:35am
[1 reply] : Divide and conquer. #include <iostream> std::size_t position_of_sma... (by JLBorges)
Declaring normal distribution generator in .h file
I have a member function that I want to generate a lot of random numbers, but I don't want to initialize the random number generator on every call to that funct...
Oct 18, 2017 at 1:48am
[2 replies] Last: > I was thinking I could declare the random number generator in the .h... (by JLBorges)
I need help with my box
I have 70 perecent of the project coded out but i just need help asking the user for each specific function. here are the instructions for further understanding...
Oct 17, 2017 at 11:56pm
[no replies]
Why is my switch case not looping?
This is my first time using the forum so im sorry for the bad format but please if someone can assist me it would be great, thanks. this is my code i want to to...
Oct 17, 2017 at 11:51pm
[3 replies] Last: error: '::main' must return 'int' your inner loop needs the variable... (by jonnin)
Operations on a switch statement
¡Hi guys, I am trying to figure out if I can do operations inside the switch statements since I am trying to do a Calculator program I don't know how to make t...
Oct 17, 2017 at 11:26pm
[1 reply] : See http://www.cplusplus.com/forum/beginner/223243/ (by Ganado)
by Clos
display the first n prime numbers
hello i am stuck and need some help. I am trying to make it so it displays the first n prime numbers (starting with 2 and n being user input)to the console but ...
Oct 17, 2017 at 9:52pm
[11 replies] Last: Look at the loop in the isPrime() function. bool isPrime(int k) { ... (by Chervil)
by slei
cpp sourcefile without #include headers?
hey, I've recently worked on a project where i've seen multiple .cpp source files without any header #includes. They have a .h files where everything is decla...
Oct 17, 2017 at 5:29pm
[10 replies] Last: It seems like we use precompiled header files, and we use Jam build to... (by slei)
Running a simple C++ program combined with a web interface
Dear All, I have some C++ code I would like to run on a web server. The C++ code itself is attached in a CodeBlocks project. To run it - add your directory p...
Oct 17, 2017 at 5:14pm
[2 replies] Last: Figures it out - it is certainly possible - a web server normally supp... (by erixliechtenstein)
by mojish
bug or what?
int a=3; int ans=a+a++; output: 7 ------------------------------------- int a=3; int ans=a+a+a++; output: 9 ------------------------------------- int a=...
Oct 17, 2017 at 3:54pm
[2 replies] Last: > why?? Undefined behaviour. See: http://en.cppreference.com/w/cpp/la... (by JLBorges)
validation on double and string
how to i validate the user's input is double or string? i want know how to validate double from the user's input. #include<iostream> double dInput; co...
Oct 17, 2017 at 3:05pm
[8 replies] Last: With some templating you can get it to work for other types. Better as... (by lastchance)
wont compile
#include "stdafx.h" //#include "Cube.h" //#include <iostream> //using namespace std; // ============ // Constructors // ============ // ===...
Oct 17, 2017 at 1:39pm
[2 replies] Last: In MenuClass::QueryUser, you're missing a } to terminate your switch s... (by AbstractionAnon)
by dan042
Function error
Write a program which will calculate the value of x using the following options x=p(1+k)^r where k =30% of p Enter the value of p and r from the user I wr...
Oct 17, 2017 at 11:16am
[2 replies] Last: x={p(1+k)^r}; In addition, the ^ operator does not do what you th... (by doug4)
Help Me With This Roulette
hello my name is mike and I am doing a simulation of a roulette .. that is, it is an American roulette .. and this is played by the hours of drawing, these com...
Oct 17, 2017 at 10:33am
[3 replies] Last: it's not C#, but C++ / CLR (.NET) Ah, OK. Thanks for the correction... (by MikeyBoy)
Filtered Range-Based For Loops
I found myself recently curious as to why the standard library doesn't have a way to filter values from a range-based for loop and decided to have a shot at it....
Oct 17, 2017 at 5:19am
[7 replies] Last: Boost.Iterator library has facilities to ease the implementation of di... (by JLBorges)
Vectors
I am trying to get my class to go into a vector I am using an older version of C++ and this was an optional assignment what i want to know is what i did wrong a...
Oct 17, 2017 at 4:25am
[10 replies] Last: Sorry about that when I posted I didnt refresh the page but it works p... (by Shiro12)
C++ array sorting
Hello.. I am stuck on how to get this started. Below is the prompt. Next, you will create another array. This third array has 4 elements, each of which is a...
Oct 17, 2017 at 1:48am
[1 reply] : This is only a minor complication of previous assignments. It tricks y... (by Duthomhas)
Can someone explain this output?
Hey guys, so I have this code from a question in my book, and i'm having trouble following along it's path to see why the output is 3_1_3_2_4_3_ Could someone...
Oct 17, 2017 at 12:29am
[2 replies] Last: It's a pretty confusing example, agreed, and it was a multi-part quest... (by Falkner92)
October 2017 Pages: 1... 678910... 16
  Archived months: [sep2017] [nov2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.