Beginners - November 2017 (Page 25)

A random number generator question.
 
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operati...
[1 reply] : Start at the beginning. Can you make an empty program that does nothi... (by Repeater)
Command Line Arguments
 
I am being asked to use command line arguments and read from files for the first time. I wrote the code the best I know how to calculate a least squares linear ...
[3 replies] Last: Do I need to change things outside of the main function? I know I nee... (by Chervil)
Want to write a CanCout SFINAE helper.
 
Want to write a CanCout SFINAE helper. MSVC is very easy to do (as always the case), but G++ is a different story. Current attempt: template<typename T> clas...
[1 reply] : ok found the answer here: https://stackoverflow.com/questions/22758291... (by elohssa)
difference between & and static
 
Is declaring a variable as static or passing it through a function using '&' mean the same thing? In both cases the original value gets modified.
[3 replies] Last: thanks :) (by closed account 1vf9z8AR)
Merge Sort and Quick Sort
 
I'm trying to implement these 4 different types of sorts and see the times it takes for them to run, but I am having trouble with merge sort and quick sort. I t...
[1 reply] : you need to call quicksort with the array to be sorted, 0 (first index... (by jonnin)
Which concepts of OO Programming to focus on?
 
I am about to do an interview in a few weeks for a C++ job, (entry level position/junior programmer), and I am wanting to review some of my old class work. I wa...
[1 reply] : For anyone wondering: https://medium.com/@nickciubotariu/ace-the-codi... (by Outlaw782)
How to manipulate a csv file?
 
My main goal is to create a class that allows me to manipulate a .csv file in such a way to where I can add contacts to the file, delete contacts from the file,...
[1 reply] : start by researching on the file format, how is data store? what field... (by closed account SECMoG1T)
by dms99
Arrays
 
Confused on how to do this problem with arrays In this program, the user will enter two digit positive and negative integers (i.e. -99 to +99) but your job i...
[15 replies] Last: this program could be a lot simpler and I'm struggling grasping your ... (by Enoizat)
Random Array
 
So i have to create an array with a random amount of numbers. I have the array working but only with a specific amount of numbers. How would i go about getting ...
[1 reply] : I am going to assume this is an assignment and you probably aren't all... (by Ganado)
by f2200j
Printing patterns
 
so my pattern has some issues with spaces. the pattern should be for a number between 1 and 15. the entered number is the height of the pattern.this output is f...
[no replies]
I dont know why this crashes on my IDE
 
This works fine on an online compiler but I need to edit it on my IDE but it crashes on Qt. Can anyone see why? #include <iostream> #include <string> ...
[2 replies] Last: *facepalm Thank you :) (by donda97)
Pseudocode help please
 
I am taking my first Programming Logic and Design class. We have not yet learned about any specific languages, just the logic using pseudocode. Unfortunately I ...
[2 replies] Last: if they did not define the pseudo code language for you (some places d... (by jonnin)
Dynamic memory - destructor causing weird issue
 
So I'm writing an ATM/Bank program using pointers and dynamic memory. Everytime an account is read in, it is allocated with new. the problem is I'm using a des...
[2 replies] Last: I think that was the issue. I went back and realized I was moving the ... (by jokersleuth)
stack in c++
 
My book says that insertion and deletion in stack only occur at the top.Does top mean end or beginnning? Also my program below shows an error about conversio...
[1 reply] : Does top mean end or beginnning The point of a data structure is abs... (by Ganado)
Limited stimulus presentation time and response registration
 
Hi, I'm working on an experimental psychology experiment. In the piece of code beneath what I want to do is present a stimulus for 600ms and of course regist...
[5 replies] Last: Ow yes, you're right, I was confusing different things. I get it now. ... (by Jonas420)
Second Function Doesn't Give a Output (1,2)
 
I'm not sure why my second function isn't giving an output #include <iostream> #include <cmath> using namespace std; void isPerfect(); void showPer...
[22 replies] Last: Thank you so much, you are a lifesaver. (by Spiderman30)
Help resetting char array for tic-tac-toe problem.
 
Im only posting my main because the entire code is too long to post. My bool winner returns false if a player wins and breaks the loop. However when the game ...
[5 replies] Last: Line 15: tic is still an uninitialized array (contains garbage). Lin... (by AbstractionAnon)
question about the end of my code
 
Write your question here. I cannot figure out why my code is giving me a negative amount of tender due at the end of the program... can anyone help? #inc...
[1 reply] : You mean this? amtChangeDue = totalBill - amtTendered; What was th... (by Repeater)
Anyone willing to help me with my homework step by step?
 
I need serious help with a homework assignment with a while loop. And i was wondering if there was anyone who could help me through it? sort of like a tutor i g...
[1 reply] : post your workings here and the issues you have and people will help y... (by closed account 1vf9z8AR)
Program to check whether a year is leap year or not
 
#include<iostream> using namespace std; int main() { int year; cout << "Enter an Year="; cin >> year; if (year % 4 == 0 || year % 400 == 0) cout <<...
[7 replies] Last: #include <iostream> using namespace std; bool isLeap( int year ) { r... (by lastchance)
November 2017 Pages: 1... 2324252627... 33
  Archived months: [oct2017] [dec2017]

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