Beginners - September 2018 (Page 5)

making your own strnlen function
 
I am trying to replicate the function strnlen, but I am having trouble making the function return the length of a string up to a certain maximum length. int m...
[6 replies] Last: thank you for your help, I was finally able to do it. (by closed account 4wbR92yv)
constructors
 
how to do constructors with this . please help #include <iostream> #include <iomanip> #include <string> using namespace std; class Employee ...
[3 replies] Last: hi guys , i finished it. does this look good? i still need to work w... (by poohbear)
multiple files
 
so iam suppose to make this work in multiple files , it was working in one whole file but then when i started dividing into 3 separate files , it stops working ...
[1 reply] : In your source file (“employee.cpp”) the compiler must be informed... (by Enoizat)
.h content
 
C++ header file - teacher asked that we include "void standardDeviation( string input, string output )" in .h file, not sure what this refernces since it is not...
[1 reply] : Do you have a question? Nevertheless, you could read: http://www.cplu... (by keskiverto)
by RahRah
how do i call cout statements to appear in a student report
 
I would like the results or output in void codesymbol and results in passfail to show in void print ***********************************************************...
[14 replies] Last: Part 3. Looking at the above output the tab does not line things up v... (by Handy Andy)
try sieve algorithm for spoj problem
 
try to solve spoj prime generator Peter wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers betwee...
[5 replies] Last: Ah. I was able to unroll it one level and it almost cut in half from ... (by jonnin)
Need help regarding reading data from a text file.
 
I have a project that requires to create 1D arrays to store names and ids. A 2D array to store ages. Then we have to read the data into arrays from a text file,...
[3 replies] Last: For your code, please use code tags (<> icon at the right of the text ... (by H00G0)
help using while and switch statement
 
Hello, I am creating a code for class. The assignment is to make a menu and asking the user to pick 1 of 3 options. once they pick the option my code jumps i...
[3 replies] Last: My pleasure! ;) (by H00G0)
even integers
 
I'm trying to print all positive even integers less than or equal to a max value. in my case it's 10. This is my starting point and i'm lost ///// #include <i...
[2 replies] Last: Thank you so much. I got my code to print out even numbers all the way... (by dfgonza)
add size
 
i need a code which add the size words , when user enter words eg : if enter "hello" is 5 and the next words "hi" is 2 the add (hello +hi) equal 7, when i have ...
[12 replies] Last: vectors can just be assigned, x = y style. C arrays memcpy is good t... (by jonnin)
Math Solver Program (with functions)
 
The goal of this program is to allow the user to enter 3 numbers, and respectively carry out either Subtraction, Addition, Multiplication, or Division. I...
[1 reply] : Do not double-post. Other thread: http://www.cplusplus.com/forum/gener... (by keskiverto)
Creating PAYSLIP
 
1.Create a class and name it Payslip. This class should have the following attributes or properties: name, pay grade, basic salary, overtime hours, overtime p...
[1 reply] : 1) Question 1 is just a duplicate of: http://www.cplusplus.com/forum/... (by MikeyBoy)
I need help fixing up my code
 
https://sites.google.com/site/uiccs141/programs/2-mastermind I need help, I am trying to make my output something like the one on the website I posted. When I ...
[5 replies] Last: Hello jthoma90, By any chance, would you know how to incorporate the... (by Handy Andy)
help with loop
 
I'm new to programming, but i feel pretty good about this program except i can't get it to loop. i would like it to allow the user to enter new numbers until t...
[2 replies] Last: Hello TheJast, I offer this version of "main" to show you what a few ... (by Handy Andy)
How
 
Write a class that extends the LeggedMammal class from the previous laboratory exercise. The class will represent a Dog. Consider the breed, size and is regis...
[3 replies] Last: so basically you mean that after inheriting the properties from the L... (by Repeater)
Need help with monkey c++
 
done. Solved
[4 replies] Last: done. Solved (by xyxzero)
Use of void function?
 
I am beginner and I was wondering why does one use void function? For example in the below code, the message can be printed directly after int main () and hence...
[13 replies] Last: Thanks a ton! Understood now. (by atreyi114)
by Aathy
How can I simplify this code?
 
Hi,Im writing a code where I have a 10 by 10 array. Each node holding information such as X and Y location and the ID of the node. Example 1 2 3 4 5 ...
[1 reply] : x/y location and ID seem redundant. am i missing something or are th... (by jonnin)
Understanding the problem
 
Write a class that will represent a LeggedMammal. Consider the number of legs, kind of fur, presence of tail. What should I do with this? Am I correct? #...
[11 replies] Last: #include <iostream> #include <string> struct mammal { enum hair... (by JLBorges)
Binomial Distribution with a coin flip
 
Hello! I am needing some help with getting this code to work. I know this is a homework assignment, but I am unable to get everything working. Our teacher gave ...
[6 replies] Last: Sorry I edited my first post. The reason being that I could not find o... (by XboxOne2019)
September 2018 Pages: 1... 34567... 20
  Archived months: [aug2018] [oct2018]

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