Beginners - July 2016 (Page 14)

by Kbott
Functions and Classes question.
So this is a build off another questions that I sorted out. I have a Point.cpp , Point.hpp LineSegment.cpp and LineSegment.hpp The LineSegment.cpp should rea...
Jul 19, 2016 at 4:04am
[6 replies] Last: A line segment is defined between two Points p1 (x1, y1) and p2(x2,y... (by closed account 48T7M4Gy)
by Kbott
Working with classes question
I am working on a project that has us working with classes and in the project we are using a .cpp .hpp and a main method.cpp. I have it working to store the inp...
Jul 19, 2016 at 3:51am
[8 replies] Last: http://www.cplusplus.com/forum/beginner/194484/ (by closed account 48T7M4Gy)
Get unused bytes from file as quick as possible
Hey guys. I stucked on how to get unused bytes from file. But i want this to be quickly. Thanks!
Jul 19, 2016 at 3:01am
[1 reply] : Please explain, what is meant by "unused bytes"? The more detail you g... (by Chervil)
Input Validation for int not working
I am trying to get the function to check if the user input is between 1 and 40. If it is not, it should cout "Invalid number input. please select again. But wh...
Jul 19, 2016 at 2:49am
[4 replies] Last: Good to hear :) (by Naughty Albatross)
Array pointers error
I'm trying to get the point for the array to return the value I enter, but it returns the memory location not the value. I tried using *y , but that gave me an ...
Jul 19, 2016 at 12:03am
[1 reply] : you need to use the code brackets #include <iostream> using names... (by Kbott)
some video about c++
I just made some C++ video on youtube, it is for self-learning, also try to help others. Comments please. https://www.youtube.com/channel/UCgaF-mLeAzLyOqBCwTgp...
Jul 18, 2016 at 10:53pm
[no replies]
C++ Program crash when doing string assign
Hello, I have a weird problem, this is my code : test.h #ifndef _test_ #define _test_ #include <iostream> #include <string> class Test { public: Test()...
Jul 18, 2016 at 9:20pm
[5 replies] Last: #include "test.h" int main() { Test p1; p1.addName("abc"); ... (by closed account E0p9LyTq)
by ASTM
Vectors and cout not working...thanks.
I am new to programming, so I am sure this is all messed up. I am trying to learn about vectors, and in this code I am trying to get the medium and average temp...
Jul 18, 2016 at 8:25pm
[2 replies] Last: Thomas1965 - thank you very much. That helps a lot. Thanks. (by ASTM)
How do I compile a program that uses nullptr?
I'd like to use nullptr instead of NULL, but when I compile using G++: g++ main.cpp renderer.cpp -I c:\some\includedir -o game I get the following compil...
Jul 18, 2016 at 3:57pm
[8 replies] Last: @ Duaos Yep, another good reason to upgrade to the latest version, o... (by TheIdeasMan)
help with records
Write your question here.we been ask by our professor to create a program using records .to perform an array 10x10 col&rows. #include <iostream> #includ...
Jul 18, 2016 at 2:37pm
[2 replies] Last: Line 27: You only allocate 15 elements for your politician array. L... (by AbstractionAnon)
Broke loop for user input
I'm trying to add a loop that'll keep the user from inputting incorrect values. This part ((!(std::cin >> wchoice)) works fine, but only handles alphabeticals...
Jul 18, 2016 at 2:19pm
[10 replies] Last: All good. Cya. (by closed account 48T7M4Gy)
random position problem
i am currently writing a win32 console application game and cant understand why the player and the traps in game get spawned in a row at a random position inste...
Jul 18, 2016 at 12:39pm
[7 replies] Last: it does! thanks for the tips! i finished the game and forgot to repla... (by globaltourist)
Need Help in multiply total by 10%
//Hello guys... I'm new to here... I want to create multiply 10% as topic says, posted my code as follows #include <iostream> #include <conio.h> #includ...
Jul 18, 2016 at 11:34am
[3 replies] Last: C++ doesn't let you specify percentages directly. You have to use the ... (by dhayden)
Why my operator* acts illogical? (1,2)
Hi there I have this code which has strange output for the result of operator* The output is totally illogical, do you have any idea? It should be about Add...
Jul 18, 2016 at 10:19am
[28 replies] Last: My code is almost done. this is a minimal code. #include <iostream>... (by sasafeb)
Help with program that will print integer digits in reverse with spaces in between
Hey guys, I'm currently stuck with trying to have spaces in between the digits of my output. What I have currently will not place the spaces in between the digi...
Jul 18, 2016 at 6:43am
[4 replies] Last: Thanks guys for the responses. I got it! You guys are awesome. (by closed account ozTkSL3A)
Unused Variable
Hi can someone tell me why I am getting the "unused variable" error for the variable g? I am trying to make a code that you enter your age and gender and it giv...
Jul 18, 2016 at 6:32am
[5 replies] Last: > you can't declare a variable inside an if-condition. The condition ... (by JLBorges)
Template and function pointer
I was reading a book about game development. I saw this line of code. I tried to copy and and understand whats going on here is the code class A { public: te...
Jul 18, 2016 at 4:22am
[1 reply] : Got it working using T t; (t.*func)() Is there a way to use the -... (by skadush)
Extremely important!!
C++ beginner here, can someone please tell me how to do this: Create an overloaded function called sumNumbers that accepts 4 ints??
Jul 18, 2016 at 2:17am
[5 replies] Last: > If I want the viewer to put in the numbers, how would I do it? In ot... (by Naughty Albatross)
value of reference does not change?
I know how passing by ref and value works well I thought I did haha but I'm still confused as to why this line of code does not change the value in number ...
Jul 18, 2016 at 12:38am
[4 replies] Last: #include <iostream> // passes by pointer void functionP(int* x); //... (by closed account E0p9LyTq)
Question: Missing a chunk of information while reading from a file.
Hello All, I have a function named showcontent. I have around 5,000 lines that I am reading in from a file. When I display the content it's formatting correc...
Jul 17, 2016 at 10:33pm
[2 replies] Last: Yes, i thought that might be the issue that there might be a limit.. T... (by JohnWilliams)
July 2016 Pages: 1... 1213141516... 30
  Archived months: [jun2016] [aug2016]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.