General C++ Programming - October 2014 (Page 14)

by tmason
Deleting a two dimensional array...
 
Hello, Consider the following code snippet: GLfloat box = { { x2, -y2, 0, 0 }, { x2 + w, -y2, 1, 0 }, { x2, -y2 - h, 0, 1 }, { x2 + w, -y2 - ...
[1 reply] : No. You do not need to call delete on anything not created by new (by MiiNiPaa)
by goldyn
Random Number Generator issues
 
It seems as though my program is working great but I'm having problems with my random number generator. It keeps giving me a return value from the computer of s...
[1 reply] : The algorithm used by rand function will give you random numbers, but ... (by zoran404)
Using nodes and Linked List
 
favorite Okay, so I am trying to create a "linked list" and I'm running into trouble and I'm a little confused on how I am supposed to implement "no...
[3 replies] Last: Would I loop through each element in the array, then compare it? ex) ... (by CS Student)
C2582 Operator = function not available in class, when using vectors?
 
My program is generating the error: C2582: 'operator =' function is unavailable in 'Brick' c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutil...
[14 replies] Last: I bit the bullet and declared imgr as a pointer instead of a referenc... (by coder777)
GLUT HELP !!!
 
Hello, just tried opengl freeglut from lazyfoo tutorials. Using CodeBlocks, linked the libs, added the search directories following the tutorial carefully, but ...
[1 reply] : Its ok now! It somehow runs now! I think i was was setting compiler op... (by hakeris1010)
by ahcfan
Visual C++ "Access violation accessing location..."
 
I have these two functions listed below. DoEvent() gets called from a window procedure whenever some event occurs. SetEvent() sets an element of the m_Events ar...
[2 replies] Last: Wanna know something funny? I struggled with this error for hours only... (by ahcfan)
problems with function
 
I'm having issues with crdw_terminate() function, the problem is after entering c# and then C#, like if I enter c1 It asks for file name, location, r/w and if ...
[4 replies] Last: In order to remove it from the head you need in cdrw_terminate() a lin... (by coder777)
by k18522
If and else statements with game scores
 
I am in comp. Sci 1 at my school and I have to write a program that deals with gamer scores and the trophy they get according to expert level. For example Tom i...
[4 replies] Last: There's a problem on this line: else if ((score >= 5000 ) && (score <... (by Stewbond)
Recursive boolean function
 
Good day everyone In preparation for examination I am going through some recursion exercises. Just when I thought that I was getting the hang of it, I came acr...
[2 replies] Last: Awesome solution, thank you. Works perfectly. (by seeflrx)
Functions homework help
 
This is what i have so far. We have to use functions to get input, find min, and print min. We have to overload functions also. This compiles but once I input s...
[4 replies] Last: Awesome Thanks! (by simrawr)
Multiple if Statement
 
Hi there i'm completely beginner to c++. Why does my other if statement (int y) not working properly? the only thing that works is the int x. When I try to run ...
[2 replies] Last: Oh that easy! Thanks for the help i understand it now. (by Escargot)
Finding words in a file
 
This function buildTree that reads an text input (contained in the file named in argv ). Then, I am opening the file, reading character by character, if there ...
[2 replies] Last: #include <iostream> #include <cctype> #include <string> #include <vec... (by JLBorges)
Test
 
#include <iostream> #include <cctype> using namespace std; int main() { int a; a = 4 * 4; cout << a; } #include <iostream> #include <cctype> using namesp...
[1 reply] : :l you can use the preview button when you want to see the formatting. (by poteto)
by xoxos
3d rotation matrix
 
been stuck for about a month on this - i use "euler angles" (tait-bryan angles) to describe rotation coordinates. as far as i understand (i would like to ...
[16 replies] Last: ftr i found my solution... // place0.r is composed of radian angles x... (by xoxos)
COMO FAZER UM PROGRAMA
 
Eu preciso de uma ajuda para poder fazer 2 programas. 1- Com conjunto com n(n<=20) nĂºmeros e informar se existe algum elemento repetido no conjunto. 2- Com...
[2 replies] Last: > You only need to remember what the last number you copied/printed wa... (by ne555)
C++ PROGRAM
 
I Need Help Making A paragraph two Power Programs . With 1 set with n ( n < = 20 ) Numbers and inform if there is a repeated zero element set . With 2 set w...
[no replies]
Tic Tac Toe Bug issue
 
My program isn't running. can someone please help me find whats wrong and how to fix it. thank you #include "stdafx.h" #include <iostream> using namespac...
[2 replies] Last: Please don't cross-post. http://www.cplusplus.com/forum/beginner/145... (by AbstractionAnon)
Read uneven records from file in to class
 
I am trying to write a program to solve this problem. The following shows a sample input file for class called Training. How can I read these uneven recor...
[7 replies] Last: Thanks duos, I will give it a try (by csstudent123)
Else-If Compilation Error
 
Hello, I am currently working on a simple code that calculates and prints the cost of viewing something through a TV company. I ran into two errors, however I c...
[3 replies] Last: That worked, thank you both for your help! (by pgagl623)
by judo11
Dictionary in C++ using File handling
 
I am now making a Dictionary using C++. My goal is to search the word and display the definition of the searched word from the text file. I have a code but it i...
[1 reply] : You aren't paying close enough attention to what you are doing. For ex... (by Duthomhas)
October 2014 Pages: 1... 1213141516... 38
  Archived months: [sep2014] [nov2014]

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