Beginners - January 2013 (Page 17)

Declaration with structures
 
I am trying to declare a struct called Hand. I need to declare an array of type Hand that can hold 52 cards. Am I doing this correctly? To be clear, it is on...
[2 replies] Last: Thank you. (by badkaykay)
How do i properly calculate an angle for a triangle?
 
So for a C++ project at college, we need to make a program where you input the lengths of 2 sides of a right angle triangle, and then the program calculates the...
[3 replies] Last: I just posted this in a similar thread today. To convert radians to... (by BardaTheHobo)
Base Class Constructor for 2D Object Array
 
I am working on a sudoku solver that finds all solutions. To obtain multiple solutions I am using two objects. The first class is "Cell" to store the value, p...
[4 replies] Last: When you create the array of Cells the default ctor is called, but sin... (by naraku9333)
Problem with cstring function
 
I am writing a program to convert numbers to words on a check. I am having trouble on the function. Any insight would be helpful. I have the pseudocode for the ...
[no replies]
Need help first time
 
First time in C++ need some help on an assignment NOT LOOKING FOR ANYONE TO DO MY WORK FOR ME just need help or examples on what to do thank you the assignmen i...
[13 replies] Last: @007: Well noted! thanks (by cPlusN00b)
by Daleth
Segmentation Fault in IF statement inside For Loops
 
I've been trying to learn C++, and as part of studying, I am building a small program to practice what I learn. I am pretty new to programming. My problem occu...
[4 replies] Last: Ah... Thanks ne555. I'll try that out. The reason I use inxx is becaus... (by Daleth)
struct pointer vector gets weird after adding another struct pointer to it
 
#include <iostream> #include <vector> using namespace std; struct player{ bool online; }; vector<player> players; vector<player*> main_queue; i...
[8 replies] Last: @OP: ¿what's the purpose of `main_queue' ? > players vector will alwa... (by ne555)
is there a trick to using inline functions?
 
Hi - I've looked at the doc, and can't see what I'm doing wrong. I have a function that I want to make inline, so I've put "inline" in front of both the defi...
[3 replies] Last: Thanks, guys. I should have been able to figure out that one for mysel... (by mzimmers)
Extracting numbers
 
Hello, I'm new to C++, how can I make a subroutine that, when I pass the string "100-1909" it extracts the two parts of "100-1909", and, using pointers, it retu...
[5 replies] Last: Thanks! (by SoapChicken)
by T4l0n
Where is the error ?
 
I just started learning c++ and im having some issues with this (compiled with Dev-C++) #include <cstdlib> #include <iostream> using namespace std; in...
[2 replies] Last: thanks (by T4l0n)
intellisense: cout is ambiguous
 
I have "cout is ambiguous" errors and I don't know why... Please help me. The program was compiled and it works . What can I do? Errors: 1 IntelliSense...
[1 reply] : Which of those headers is system and srand declared in? (by cire)
[SOLVED]Problem with OpenGL method.
 
Hello, guys. I'm trying to make a program using C++ and OpenGL, but i'm facing some difficulties. I created a class that i called "Keyboard", in this class i'...
[16 replies] Last: So, i've asked this question in opengl forum,and a guy answered me. Ta... (by robgeek)
Random number problem; i changed for ISO
 
I'm trying to create a program generating a set of random numbers each time its run. The code: #include <iostream> #include <ctime> #include <cstdlib> ...
[1 reply] : the int i you declared in the first for loop exist only for this for l... (by ritka)
nChoosek
 
This is a program that prompts the user to enter a "n" value and a "k" value, and return how many different ways one can choose a value k from a distinct group ...
[4 replies] Last: Thank you both, all good now. (by sebajun)
new to open gl
 
Does anyone know where I can get a list of open GL functions and what they do?
[2 replies] Last: Ok I will try that thanks. (by zedidiah)
i wabt to know my mistakes
 
whats wrong with my cin nd cout lines #include <iostream> void main () { int a,b,c,d,e; cout<<"Enter The Students Subjects \n Enter the First Su...
[3 replies] Last: thx for you two (by Amr Zahran)
How do i calculate angles in a right angle triangle in C++
 
So for a project in C++ class, we have to make a program that you input the lengths of side x and side y, then the program calculates the hypotenuse and both an...
[1 reply] : Better refresh some trigonometry, then you can apply those calculation... (by Santosh Reddy)
What is the LRESULT (long) mean? What does it do?
 
I learned that the LRESULT is the return value. LRESULT is a long, and can be written as long __stdcall fnWndProc(...). But what is a 'long' and how does it hel...
[no replies]
question
 
i was wondering how do you put an error message if a user enters letters, i want the input to only accept numbers
[1 reply] : For eg. like this: int main() { int x; while (true) { co... (by JockX)
Simple structure
 
Hello. I'm trying to write abstract data type - List. But first I have to understand some properties of structures. I wrote this code: struct Example { ...
[3 replies] Last: It was not my intention to create dynamic object. Thank you very much.... (by tobiasz24)
January 2013 Pages: 1... 1516171819... 52
  Archived months: [dec2012] [feb2013]

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