Beginners - March 2018 (Page 22)

Confused on how to iterate through a list function
 
I'm running a test program where I make a list of strings and try to find which strings have a certain suffix or prefix. #include <iostream> #i...
[1 reply] : #include <iostream> #include <list> #include <string> #include <algor... (by JLBorges)
Am I going in the right direction?
 
I am currently creating a neural network. I know it's going to be a tough goal for a beginner like me, but I honestly don't have anything else that actually mot...
[no replies]
Help with Program
 
For the program I am supposed to make the each number of the array increment by the number that is given by the user. For example: Array of the numbers [1,2,3,...
[2 replies] Last: The user is should be allowed to enter as many increments as they want... (by TonyR1234)
Help with Dynamically Allocates Array Program
 
Write a program that dynamically allocates an array large enough to hold a userdefined number of test scores. Once all the scores are entered, the array should ...
[1 reply] : What is the purpose of line 50? What is the second parameter on funct... (by keskiverto)
basic c++ help
 
Write a program that calculates the occupancy rate for a hotel. Calculates the occupancy rate for a hotel. The program should start by asking the user how many...
[2 replies] Last: how would i output the data that the user entered, Samuel? If they ent... (by browngirl123)
Having trouble with getline
 
I'm trying to program a really simple RPG with my friend from work based on this game we play there leveling him up. In my "main.cpp" I have the person enter t...
[7 replies] Last: Hey thanks a lot everyone! I think I understand it now. The explanat... (by Symphoneee)
Temperature conversion issues.
 
Write a temperature conversion program that asks the user to choose between Celsius-to-Fahrenheit conversion or Fahrenheit-to-Celsius conversion. The user will ...
[3 replies] Last: I've altered you're program to make it more straight forward You are d... (by alonso12)
character arrays
 
so i keep getting the errors 1.syntax error: identifier 'Technichian' 2.'='; cannot convert from char to char 3.'{' missing old function header (old sty...
[2 replies] Last: First, again , please use code tags when posting code. See http://www... (by keskiverto)
what's the best algorithm for selection sort?
 
does anyone know whats wrong with this code? #include <stdio.h> #include <stdlib.h> void swap (int a, int b){ int temp; temp = a; a = b; ...
[1 reply] : a and b are passed by value to swap(). Make them references, or their ... (by lastchance)
constructor causes crash
 
Hi guys so I'm at the point where I think I'm comfortable enough to start trying some frameworks/apis so I am thinking of learning the qt framework so I can sta...
[2 replies] Last: thanks repeater that makes sense :) and true but how come we wrap the... (by adam2016)
by sb99
Why is ios not a class or namespace and why is fixed/showpoint subsequently undefined?
 
std::cout.setf(ios::fixed); std::cout.setf(ios::showpoint); std::cout.precision(2);
[2 replies] Last: ohhh, I did not realise ios was a part of std, I thought ios was it's ... (by sb99)
by Neahle
Show the same picture on all computers.
 
Hello, Im trying to figure out how to code a program, that shows a picture. The only problem I have at the moment, is that the picture will only show on my c...
[9 replies] Last: your performance and user friendlyness will be improved if you use opt... (by jonnin)
Classes and Data Abstraction Assignment
 
I need help with my assignment for class. Please note I am not asking anyone to do the work for me, just asking for hints. Here is the assignment: Design an...
[1 reply] : a void adder might look like void addto(type &in, type &value) { ... (by jonnin)
passing pointers to different functions
 
I'm working on a college project in which I need to make minesweeper. I have to make it without using global variables, which is started to become a headache. A...
[4 replies] Last: thanks for the reply. I've decided to try and do it as a public class... (by binaary)
no arrays allowed help for standard deviation
 
Hello, Totally new at this and im not sure how to re build my code without the use of arrays or vectors? how do i properly add a cin.clear or cin.seekg(0)...
[5 replies] Last: This rewrite might help to explain. #include <iostream> #include <cm... (by lastchance)
Is this code salvageable or not.
 
I was doing a example program and it states that: A courier company charges $1.50 per kg, with a maximum charge of $15.00. Write a program which allows the...
[2 replies] Last: A simple way: /* Write a program which allows the operator to enter ... (by Thomas1965)
Read access violation calling pointer function - "this is nullptr"
 
I've been getting this read access violation exception for hours now and I can't for the life of me find out what it is. It was working before now I don't know ...
[2 replies] Last: JLBorges... saved my ass once again. How the hell did I miss that? You... (by megatron 0)
user defined functions
 
I have attempted to write a code to solve a homework problem. Problem statement: Your program should allow the user to do the following: Choose among coffee, c...
[1 reply] : the int coffeeBeans (...) is a legacy that I forgot to remove. Also ... (by link45jeff)
Problem with dynamic arrays and pointers
 
I currently am having trouble getting a program to work that is supposed to create a dynamic array, pass it to a function that sorts it in ascending order, pass...
[3 replies] Last: Oh and don't forget if you promise the compiler that a function will r... (by jlb)
by Joe C
>> and << for User-defined-type
 
Good day, I'm having bit of an issue regarding writing to and printing from a user defined type. Here is the code that doesn't work. #include "stdaf...
[2 replies] Last: Thank for the reply. This looks like what I'm looking for but I'm afr... (by Joe C)
March 2018 Pages: 1... 2021222324... 29
  Archived months: [feb2018] [apr2018]

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