Beginners - September 2018 (Page 3)

multiple files
 
the functiondate.cpp is not compiling . these are 3 multi files . can someone help me why its not working header file #include <iostream> #include <iom...
[4 replies] Last: thank you , it works (by poohbear)
Question about reading data from an infile
 
Hello im a beginners computer science class and ive been asked to asked to create some code that will read information from a file and reprint that information ...
[4 replies] Last: What is the exact error message? std::inFile is definitely wrong, ... (by keskiverto)
i need help urgent
 
so i need some help with a program im trying to do , its simple and one #include <iostream> is allowed so ill type the question and post what i attempted.the pr...
[4 replies] Last: thankyou soo much , really appreciate the help . :) (by RobertCalvin)
Trying to add the three constants
 
So the assignment requires us to make a game of Craps and also put three constants in the program. The game works I'm just trying to figure out how I would get ...
[1 reply] : I'm not sure what you ask. However a note, you have essentially: co... (by keskiverto)
Help
 
Hello i want to sum digits in int can you help me? ok here is example: i have 6 digit number 123456 i want to sum 123 and 456 i want first 3 digits sum and la...
[1 reply] : In an integer number, to get the first n digits on the left you can di... (by Enoizat)
question with sum of numbers program
 
I need help displaying the numbers that are being added. For example if i input 5 it will add 5+4+3+2+1=15, but it will only display 15. I dont know how to get ...
[1 reply] : What values will the variable 'i' inside the for-loop take? (by Enoizat)
by Tduck
How to use fstream?
 
Let's say I had a .txt file called "textFile1," and I wanted to record 5 lines of text from it. 1. text 2. file 3. example 4. lines 5. here Now, ...
[5 replies] Last: "Understanding fully" is overrated. Surely you did understand some bi... (by keskiverto)
help
 
can someone help me? my bool function is compiling but isnt showing up on output. Design a class called Date. The attributes of a date are three integers tha...
[1 reply] : What output do you expect from int main() { } (by keskiverto)
C++ Morse Code
 
Hello everyone! I'm having trouble trying to find out what's wrong with my code and i would really appreciate if someone could help me, please. when running ...
[12 replies] Last: oh yeah my bad that was compiler's installation directory, here it is... (by MongKong)
Please help me !!!!
 
Hi Everyone, I just started playing around with C++ with Xcode, but this happened to me when I run the code, the line "Program ended with exit code: 0" appea...
[1 reply] : If that message is indeed before your program's "output" then is proba... (by jlb)
Factorial Number with FOR loop
 
Write a program that uses a function for to evaluate the factoriales of the points of the 1 to 5. Show The results in format to tabulate. What dificult might pr...
[8 replies] Last: thanks master jedi (by luciusFernatore)
Removing item from ordered list via binary search, and getting seg faults.
 
I implemented the code to remove an item from an ordered list (low to high). The code seems to work only if valueToErase is done with something like: clas...
[5 replies] Last: @JLBorges Fixed it. Thank you. The issue was that I doing arithmetic t... (by fiji885)
by libi
String Triangle
 
The below code displays: c co com comp compu comput compute computer But I'm trying to make it display: r er ter uter puter mputer omputer ...
[4 replies] Last: Ohh I see how you did it, thank you! (by libi)
codeblocks autocomplete problem
 
Hey guys, I seem to be having a problem with auto completion,one of the main reasons people use an IDE is for this feature so it's very tedious without it, I ...
[3 replies] Last: Thanks Andy =) (by adam2016)
If statement doesn't work correctly
 
I'm trying to code a tic tac toe game. I'm adding some check functions and I've a problem with the if statement in the checkvalidmove(int move);. It doesn't ret...
[6 replies] Last: Hello RustyJoe, You are welcome. Sometimes it is the simple things t... (by Handy Andy)
am i correct
 
Write a program that will display the value and logical address of an uninitialized float array with size twenty (20) and a reference pointing to the array. ...
[2 replies] Last: In your code, ref is a reference to the 21st element of your array ... (by MikeyBoy)
constructor function
 
Hello everyone, with this program I wanted to display 3 dates, but i'm lost with how to put day, day2, day3 in the main and return those 3 values. the error I g...
[5 replies] Last: First an ugly distraction: #include <iostream> #include <map> #includ... (by keskiverto)
how do you solve this problem
 
Write a program that will change the value of an integer variable with initial value of 654,321 to 27,946 without directly assigning a value to the variable. Yo...
[8 replies] Last: #include <iostream> int main() { int x = 654321; x -= 626375; ... (by coder777)
by weee
a little confusion about copy return value.
 
came across this code on cprogramming.com about move semantics #include <iostream> using namespace std; vector<int> doubleValues (const vector<i...
[6 replies] Last: std::vector has a move constructor. The vector is guaranteed to be mo... (by Peter87)
Where to put many game objects
 
What's the distinction between a canister vacuum cleaner and a classic upright? Hands down, the canister is more versatile--they not just manage rugs, but they...
[1 reply] : Why don't you create a Game class that can hold all the data and have ... (by Thomas1965)
September 2018 Pages: 12345... 20
  Archived months: [aug2018] [oct2018]

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