Beginners - March 2017 (Page 7)

Initializing an array of structs with functions
 
Hello, I need some help creating the function prototype and function call for an array of structs. I have never done this before any help appreciated. Lets use ...
[6 replies] Last: I think I got it thank you all! (by CisntEZ)
Why are my variables not carrying over?
 
This program takes city names and numbers out of a text file, then does a computation with the numbers for each city and finds the highest and lowest of those c...
[no replies]
Hello everyone, How to do this how do i start
 
develop a program that continues to read data values as long as they are not decreasing. The program should stop reading whenever a number smaller than the prec...
[3 replies] Last: Study this code, test it, make sure that you understand it, play aroun... (by JLBorges)
Classifying numbers from file - All registered as zero?
 
Hey guys, I'm trying to make a program that reads a file (which has a list of integers) , checks each integer if it is a zero, odd, or even and then increase th...
[1 reply] : #include <iostream> #include <fstream> void update_counts( int numbe... (by JLBorges)
How do i get my function to read the entire file and what is wrong with my function
 
I am trying to read in all the letters and numbers from a file and change them with a caesar cypher code. (For example, if k = 3, then the letter A would be rep...
[2 replies] Last: even when I change the function to while(input.get(characters)) { ... (by pdgaming)
Help with for/while loop
 
This is my first post - sorry if its not in the right spot. I need to modify the following program (using a for and/or while loop) so it displays 20 lines of d...
[3 replies] Last: Can't use <conio.h> in my Linux machine, anyway I hope the following c... (by Enoizat)
Getting multiple lines and numbers from a text file without using arrays..?
 
This program is supposed to pull names of cities from a text file, followed by six numbers for each city. Then it is supposed to do a calculation with those six...
[no replies]
My function doesn't assign variables a character
 
I made a little tic-tac-toe game. I first made it using a crap ton of if statements after every move to assign a certain variable an X or O. I wanted to make th...
[1 reply] : So the error message points to line 9 correct? My guess is that the f... (by bmakloski)
My program doesnt work !
 
HI , Following code is for my project for basic C++, we have to get the data and store them and sort them and then display . When I compile my program I dont ge...
[no replies]
Randomly printing out a string
 
Hello, in my code i need to print out a random Harry Potter spoiler out of 5 of them, this is what i have so far: #include <iostream> #include <string> ...
[4 replies] Last: What compiler are you using? Try adding: #include <cstdlib> ... (by kingkush)
How to do this.
 
There are 10,000 people in a town whose population increases by 10% each year. Develop a program that determines how many years it would take for the population...
[3 replies] Last: #include <iostream> using std::cout; int main() { int pop = 1000... (by mertsamilgul)
Help with Polynomial Class and Dynamic Arrays
 
Hello, I am doing an assignment for my 2nd year programming class. I am supposed to create a program that can add, subtract, and multiply polynomials and consta...
[no replies]
Getting Wrong values for money to coins program
 
Hey guys. I am trying to make a program that will convert a $ amount to change. Ex. $4.35 = 4 dollars, 1 quarter, 1 dime, 0 nickels, 0 pennies. The problem i...
[4 replies] Last: when i had to do a similiar probably my teacher just said to use int a... (by kingkush)
How to make a function use objects outside of function they are declared in
 
I just wanted to know how you retrieve object values outside of the function they are declared in, like in my project I have a function outside of main and want...
[3 replies] Last: I was assuming this would be a universal thing, so I didn't think of a... (by moosyman)
Comparing C-strings
 
Hi. I made this program so i could verify if a certain molecule is an Hydroxide (if it ends in "OH") or not (it´s not for fun, it's for school). I believe the ...
[2 replies] Last: Thank You God Peter87! :) *clicks in like button* (by FranciscoSAW)
help smart pointers
 
can anyone help me write this ptr. disc is a another class with a has a relation ship with disclist. uml -disclistptr* :LinkedList<disc*>*
[4 replies] Last: for future referance for anyone who may read this. std::unique_ptr<Li... (by ttiimm13)
Learning C++ with MOOCs or videos?
 
Recently I started taking up C++. Most of what I know about coding I picked up for work (a lot of VBA, some Python). I want to learn C++ to build high performan...
[3 replies] Last: i think it's bucky roberts actually https://www.youtube.com/watch?v=tv... (by gunnerfunner)
Unable to open second file after the first
 
I have a problem with the following code(Only the lower part,upper are just for explanatory purposes ) struct info /*declarations/* { ...
[6 replies] Last: @Handy Andy First of all, I appreciate the detailed response, thank yo... (by adventccy)
Input validation errors
 
Hi, I'm writing a code that will allow a user to enter an integer between 0 and 59, the code needs to have a validation in case a non-integer is entered (inc...
[7 replies] Last: @NeedsafeLife You are trying to do many things at the same time which ... (by longberns)
How to quickly compare an integer to multiple integers?
 
I'm working on a simple text game, but with their being several items usable by a single class, I want to make sure that a variable called equippeditemID can be...
[2 replies] Last: there are other ways. If the arrays were sorted, as soon as you found... (by jonnin)
March 2017 Pages: 1... 56789... 36
  Archived months: [feb2017] [apr2017]

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