Beginners - September 2016 (Page 20)

still learning
 
How do I read in a file, and then take a line from that file and split the line at a unique character?
[1 reply] : It's quite simple. You read the line with getline, then use std::strin... (by Thomas1965)
calcPay
 
Could someone please help me? I have been working on this code for about 3 weeks now. I have had help from a tutor at our school and he was not able to help me....
[5 replies] Last: I appreciate all of your help AbstractionAnon. When I run the program ... (by tlctech)
Input from txt file Problem
 
Im not allowed to change main and i feel like ive gone wrong with drawing the inputs from the text file, and used a variable i havent set properly hence the ins...
[5 replies] Last: Thanks youre my saviors. all i have to do now is tinker around with se... (by Rossy23)
how to interpret typedefs
 
File hello.h /* hello.h */ #include <cstdio> class A { public: A(); void init1(); inline void fun () { printf ("A::f...
[2 replies] Last: typedef http://en.cppreference.com/w/cpp/language/typedef Yours say t... (by keskiverto)
Use of pointers for final project.
 
I am getting a C2039 error when I build the project. Stating "setName" is not a member of std::basic_string<char,_traits<char<,std::allocator<char<<. I am sup...
[4 replies] Last: customer.cpp ---------------- Line 5: Extraneous " on #include Line ... (by AbstractionAnon)
Hailstone sequence
 
I cant figure out how to return the largest number in a hailstone sequence while using a loop and no recursion. My sequence is {7,22,11,34,17,52,26,13,40,20,...
[2 replies] Last: Falcon612, Try this: int sequence { 7,22,11,34,17,52,26,13,40,20,10... (by Handy Andy)
Help with random number generations
 
This is my assignment, the goal is to look like this but with 30 days: Starting salary: 0.05 Number of days to work: 5 Day 1: 0.05 Day 2: ...
[13 replies] Last: A compiler says: In function 'int main()': 18:9: warning: statement ... (by keskiverto)
real time C++
 
Hello all, first of all, I really thank the owners of this weblog who made solving our problem more efficiently. Now to my question: I have a arduino Mega 2...
[3 replies] Last: I have mentioned that I want to do it with C++, all I am asking is ho... (by jlb)
Having weird issue with setw
 
On my outputData function my first output "Name: " is coming in at different alignments. while my other outputs are just fine. #include <iostream> #includ...
[4 replies] Last: Thank you so much Chervil! That worked perfectly. I really appreciat... (by nyork3415)
Nested Structures
 
Error says that "field warmss has incomplete type" How do I declare another structure inside a nested structure ? How do I use them in my inputs and outputs? ...
[1 reply] : Hi hpacleb, Why did you put all struct definitions in a function? 'ite... (by closed account LNboLyTq)
Hey I need some help with a school C++ problem
 
So we just started doing programming class at my school today and after learning the basics of C++ our teacher taught us the basics of strings, we did a few pra...
[6 replies] Last: So today at school the teacher told us she forgot to mention there was... (by NeuroPhen)
I am getting undefined reference for cusing class objects in shared libraries and dlopen
 
FILE main.cpp #include<iostream> #include<dlfcn.h> #include "hello.h" using namespace std; typedef A* (*creatorFunction)(); int main() { void *han...
[2 replies] Last: You cannot create an object of the type A with new since the constru... (by coder777)
Help with finding and outputing string from array.
 
Working on a project from class I got it mostly right at this point but I'm having trouble with search function. I want to search my array (which is pre-loaded...
[5 replies] Last: ok I think I figured it out. Thanks for the help! int search(Presi... (by nyork3415)
by noodel
started programming only like yesterday
 
Hi hello. How do i make this program print out the digets of a number thats entered, twice? e.g. if entered 456, output should be 445566. Thanks, i know i have ...
[2 replies] Last: Never took programming seriously. Last year i only wanted to survive s... (by noodel)
New to C++, need help with assignment
 
I am not being able to catch on with this assignment and have struggled to understand it. The question is asking: You have 10 cows on your farm. You want to ...
[1 reply] : forget leave c++... what would you do if this was your standard math... (by shadder)
Ending code
 
I am writing a code for that allows a teacher to enter assignment score for each student and then find the minimum, maximum, or average score for each assignmen...
[1 reply] : you could start by reading these http://www.cplusplus.com/doc/tutoria... (by shadder)
odd num, is this right?
 
#include <iostream> using namespace std; int main() { int n, x, m, div, pow=1, i=0; cin>> n; x=n; do{ x/=10; pow*=10; ...
[4 replies] Last: x = x / 10; (by Duthomhas)
Help with output
 
Hello, does anybody know why when I build this code, none of the values show up? Am I missing anything important or did I make a mistake in the code? For those ...
[1 reply] : for (price = 1 ; price <= 25; tax = 0.825); This loop has many probl... (by shadder)
What type of loop would I use?
 
I had an assignment that asked me to create a program like this: " Enter the letter: X Enter the number: 7 Here is your shape: XXXXXXX XXXXXXX XXXX...
[2 replies] Last: Thank you! :) (by forapsu1010)
Desperate help with my code
 
I'm having trouble with my code, how would I change the sort to largest to smallest? Also, I was told that I have to change const int size = 12 and replace a...
[1 reply] : 1) You are using a selection sort: for each element of the array, find... (by Duthomhas)
September 2016 Pages: 1... 1819202122... 34
  Archived months: [aug2016] [oct2016]

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