Beginners - September 2013

how to return multiple values
 
how do I return both of these values back into my program? double getInput (double hourswork...
[2 replies] Last: As lb mentioned instead of passing by copies pass by reference you wou... (by giblit)
omit even numbers. please help!
 
How do I get it to make me enter another number if it isn't an odd number? #include <cstdlib> #...
[3 replies] Last: That's the whole point it looks when it is even. Because you wanted od... (by giblit)
can't make function work
 
I'm supposed to make a simple game of 21 (blackjack but without the suits) program using an array fo...
[4 replies] Last: Thank you! That did the trick! (by Khillz3000)
How to learn OpenGL
 
Hey all, wondering a good source to learn basic OpenGL for XCode. I'm pretty new to programming so ...
[2 replies] Last: Eh, OpenGL for Mac is complicated because of the drivers being limited... (by closed account S6k9GNh0)
by maxbb
struct in struct
 
// test1.h struct a { int data; struct b { int data; }; }; // test2.h str...
[1 reply] : Without the definition of struct a, the compiler doesn't know that the... (by LB)
by layzer
Help getting dice to roll 10000 times.
 
I have to write a program that rolls 2 dice 10000 times in a game of craps and calculate the odds of...
[2 replies] Last: Perfect! Much appreciated! Thanks! :D (by layzer)
Velocity Calculation gone wrong
 
The numbers I need to input test are as following: Start milepost? 321 Elapsed time (hours minutes...
[7 replies] Last: I would suggest xismn's method it is more accurate since doubles are t... (by giblit)
by anzhit
Weird error being returned by codeblocks
 
This is a part of the code for a assignment. it compiles properly but whenver i run it it runs fine ...
[3 replies] Last: Thanks just figured out i forgot to initialize the index array a . Pro... (by anzhit)
by NowSee
The OpenGl window application
 
Hey, iam currently working with the book "OpenGl Game Programming" - Kevin Hawkins etc. In the c...
[5 replies] Last: Right on, L B. (by xismn)
random numbers from 50 ~ 100
 
I have a code that generates 40 random numbers from 50~100 and put them in array and then sort it fr...
[9 replies] Last: @akshayoh thanks! it works now :3 (by timk123)
Accessing array of an object
 
I am overloading the * operator and I am having trouble accessing the array of the object that the m...
[11 replies] Last: sorry my mistake... the caffiene is wearing off, and thought you said ... (by closed account Dy7SLyTq)
by Sujing
Need help for counting unique lines
 
Hello. I am currently trying to write code for finding unique lines as well as unique words. I have ...
[3 replies] Last: Something like this: unsigned long getUniqueWords(const std::string s... (by xismn)
I need help writing certain lines of code
 
I need help writing a specific line of code: 1) I'm asking use to enter a file name. How do I wri...
[5 replies] Last: i used if(!fin) thanks though (by toshbar)
Calculating Pi
 
For class we need to write a program that takes in an input (n) that determines the number of terms ...
[4 replies] Last: You should be able to do it pretty easily with a for loop Basically ... (by giblit)
by stacyd
removing a comma from my output
 
I need the comma in my program to be removed in my output I messaged my instructor for assistance an...
[3 replies] Last: does my last.find look right? I am not sure what to put in the () for ... (by stacyd)
Compiling error I cannot locate
 
I'm getting an error and cannot figure out how to fix it The error is in line 42: error: a function-...
[no replies]
pointing to an array of strings
 
Hi I have a program that splits up a file and creates a pointer to an array of strings and I was try...
[2 replies] Last: I loose credit on the assignment if I change certain predefined functi... (by supercheese)
help me for erors
 
Write your question here. hi . help me for erors. im beginner :) it must be give number of product...
[7 replies] Last: Do you know why lines 16 and 18 don't make sense? ;) (by LB)
by Sujing
How to remove same words from set?
 
I want to find the number of unique words. I have a code that does that but not quite what I want. I...
[7 replies] Last: Ah, yes. I included that but it's still giving me wrong answers, large... (by Sujing)
by Ch1156
Compiler tells me im trying to convert a string to int?
 
Ok so i put a pointer to a vector in my Customer class and now its giving me 2 errors Customer_...
[7 replies] Last: As far as I know, in modern C++ there is never a reason to use a real ... (by LB)
September 2013 Pages: 123... 65
  Archived months: [aug2013] [oct2013]

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