Beginners - July 2016 (Page 16)

How would you make an input validation to allow only positive numbers?
 
I am making a program to tell the user what kind of triangle the sides entered make. How can I ensure they can only enter positive values. Using a loop or funct...
[11 replies] Last: @Austinomical, If your question was answered to your satisfaction, ch... (by closed account E0p9LyTq)
by Leese
Trying to debug, stuck!! (1,2)
 
Trying to debug for an assignment. I'm stuck at the line "MyStruct aStruct = { 4,3.5, MyEnum ,"Dogs" };" Not sure if I'm inputting something wrong or what. ...
[28 replies] Last: Good to hear :) (by Naughty Albatross)
Help Finding: average age, quitting program, and number of males and females entered
 
Hi there. I am having trouble finishing this. I think my code also might be a little out of order, due to doing this in various steps. Here's the question: ...
[16 replies] Last: Does that help? : ) (by Naughty Albatross)
Splitting String Help
 
Hi, I have this string here: " Membership information ---------------------- Nodeid Votes Name 1 1 Server1 2 1 Se...
[5 replies] Last: Try : int id1, id2; std::string server_name; std::stringstream ss (... (by Naughty Albatross)
beginning do while loopo
 
Just started a beginners class and can't get my do while loop to work. Can anyone help me with this. The rest of the program works how I expected it to work. ...
[6 replies] Last: Does that help? :) (by Naughty Albatross)
Creating a Linked List
 
I'm working on a project to create my own linked list and I'm having some trouble with the print function. Specifically, how to iterate through the pointers to ...
[2 replies] Last: Brilliant! Thanks for your help! (by closed account oEwqX9L8)
SFML - Multithreading help
 
Hello my friends been a very long time since I visited the site hope you are all doing well. Anyway on point, I am making a class that manages my SFML window...
[18 replies] Last: I haven't looked at the threading tutorials on the SFML, I skipped th... (by cire)
hierarchy
 
I get that this is an assignment and I'm not looking for someone to just do this. I'm trying to figure out where I start to complete this. I've been reading my ...
[1 reply] : Your first bet would be looking at that text file, and start defining ... (by megatron 0)
Free memory with pointer?
 
Say I allocate memory a linked list like this one. struct linkedList{ stuff... linkedList* p_nextItem = NULL; } for (int i = 0; i < 10; i++{ ...
[2 replies] Last: Yes, this was only a short example to clearify my question. The list i... (by suckAtCPlusPlus)
Array Returning nothing but 0000
 
I am trying to write an array with user input, read, sort, and print. I have the beginning done, and do not want any help with the rest, what i am looking for i...
[5 replies] Last: We've all been there perkins, all been there. If you have any small qu... (by megatron 0)
by FBHSIE
No such file or directory error?
 
When I open http://prntscr.com/btc1s8 c++ source file main and build and run it, I get no issues. It builds fine. However, when I try to make a zip. ...
[15 replies] Last: Zip the folder but leave the original files as they were. Copy then zi... (by TheIdeasMan)
OpenGL - Filling an object
 
Hey guys... I'm experimenting with filling an object with colors. void drawRotatingObject( const Point & center, int rotation) { struct PT { ...
[5 replies] Last: it's not strange, the more people who know about the pathology of cire... (by closed account 48T7M4Gy)
confused with this (1,2)
 
Hi guys I'm pretty confused with this,so I'm passing in the address of numbers into the returnPointer function,this is what I thought was happening I thought th...
[31 replies] Last: I think you got the wrong thread Kermort =) do you have any idea why ... (by adam2016)
Easiest way to do toggling
 
Hi everyone, I am learning some of that C++ for quite some time mainly with UE4. So yea...another one like me :D. I wanted to ask what is the easiest way to do...
[2 replies] Last: At first glance you could make an enum: enum ObjectState { INACTIVE,... (by megatron 0)
help me
 
i try this code, and it keep on display an invalid number has been entered. where did i do wrong? #include<iostream> using namespace std; int main() { ...
[6 replies] Last: Good to hear :) (by Naughty Albatross)
Template partial specialization
 
Hi guys, what is wrong with my code ? template <class T,int n> T sum(T a){ return a; } template <double,int n> double sum(double a){ return a; } templat...
[11 replies] Last: Just thought these might be relevant as well, but one should be very w... (by TheIdeasMan)
Difference between these two codes?
 
So take a look at both these codes here: (1) www.cplusplus.com/reference/vector/vector/rbegin/ (2) http://www.cplusplus.com/reference/iterator/reverse_iterator...
[2 replies] Last: Oh snap! Did not see that coming. Well, I guess we're done here then... (by Arslan7041)
by stav
hows graphics done on things like slot machines
 
so i know graphics on normal computers are done using something like opengl or direct x to control the graphics card but how's it done on things like bill bo...
[1 reply] : Billboards come in many different forms. The simpler ones are matrices... (by helios)
Erasing elements from two vectors at the same position
 
Im trying to make a program that erases the zeros in a vector but i get the error: /Users/T_HEN1203/Documents/Stats.cpp|62|error: no matching member function...
[1 reply] : That's because the erase method(s) works with iterators. You're passin... (by MrHutch)
Output for ifstream not working correctly
 
I am having trouble printing the array of integers after they are inputted into the program from the file. The prices.dat file I created contains 10 numbers, bu...
[10 replies] Last: Glad it helped :) (by Naughty Albatross)
July 2016 Pages: 1... 1415161718... 30
  Archived months: [jun2016] [aug2016]

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