General C++ Programming - August 2012 (Page 8)

Function Pointer Signature Issue related to Inheritance
 
I'm programming a game engine and having an issue with the design of a function. The function will search a directory for a specific type of file, then use tho...
[4 replies] Last: As suggested by coder777, I have made my build functions static. I hav... (by skrug80sc)
by Senith
Define Variable once in function or scope and don't delete its value after its done
 
So far I looked this up on Google multiple ways and I can't find what I'm looking for. What I would like to do is call a function I made, and inside that f...
[2 replies] Last: When I looked that up they kept saying that if you use static that it ... (by Senith)
Circular queue size, help me please !!
 
Dear all, I am implementing a circular queue, but I can't find the formula to obtain the size of the queue; this one doesn't work correctly and gives me wron...
[5 replies] Last: int size = abs (m_tail - m_front) ; ¿why do you use abs() ? ¿when... (by ne555)
by Godex
Variable X is being used without being initialized
 
This is been frustrating me every-time I try and learn more Cplusplus. So I'm hoping this site will be able to help me. Apparently check needs to be initiali...
[2 replies] Last: Moschops. Thanks for pointing that out. No pun intended. Here is m... (by Godex)
Difference between "this" in C++ and "this" in Java
 
We usually use this like a pointer (in fact , it is a pointer) in C++ Here is the code : #include<iostream> using namespace std ; class Test{ priv...
[4 replies] Last: thanks guys . (by Raman009)
by Alx101
OpenGL Pixel Format freeze
 
I am having a trouble with my OpenGL Powered game engine. The problem arises at the creation of a pixel format. The program gets stuck loading when i call wg...
[2 replies] Last: Problem solved, Removed Multisampling from the ARB list and that fixed... (by Alx101)
Memory allocation to class
 
Here is my code : #include <iostream> #include <string> using namespace std; class Person { private : string name; int age ; float s...
[7 replies] Last: I never saw the expression template class template. I don't know in an... (by aquaz)
main cannot call class functions
 
everytime i try to call a function from a class, the program crashes. can someone take a look and tell me what is wrong with the program? header: #ifndef...
[1 reply] : array is NULL, so how is the following supposed to not crash? array[s... (by Athar)
Accessing the private members of a structure .
 
Here is my code: #include <iostream> using namespace std; typedef struct { private : char name ; int age ; }man; int main() { ...
[8 replies] Last: So we can do it like this : #include<iostream> using namespace std ;... (by Raman009)
by takzee
Access violation
 
Hi guys , I hate to ask it again but I have no choice since I have no idea how to solve it . I am having this error and it crashed. First-chance exception...
[5 replies] Last: use BTNode<customer> *t1=new BTNode<customer>(input); this will c... (by mik2718)
by hak
Help solve
 
a prgra that ask a user to enter the distance of a trip in kolimeter per liter estimates for the user's car ,and the price of a liter petrol. calculate and dis...
[3 replies] Last: thank guy (by hak)
output of the program??
 
#include<conio.h> #include<stdio.h> #include<string.h> void fun(char str1 ,char str2 ) { if(NULL!=(strcmp(str1,str2))) printf("STrings are not equal\n"...
[1 reply] : The strings are not null terminated. Change to char str1 = {'a','b',... (by Peter87)
Binary Search Tree
 
Any suggestion for How do you put a Binary Search Tree in an array in an efficient manner. Hint :: If the node is stored at the ith position and its children...
[6 replies] Last: @viliml: can you find some other way... (by HiteshVaghani1)
#PG?!
 
Hello. Here's my code: #include <iostream> using namespace std; int f(int p, int q, int n) { int m; if( p%q >= n) return n; m = n *...
[4 replies] Last: I get a general page fault on my computer, an intel® processor, and ... (by Cubbi)
Need help
 
Personal Deductions: Single = 9, 000.00 Head of the Family = 12, 000.00 Married = 18, 000.00 Additional Deduction / Exemption: 8, 000.00 / dependent...
[7 replies] Last: Okay so i finished coding..thanks for helping BUT..i cant run my code... (by wanderevil)
problem increating hello world program
 
#include <stdio.h> #include <iostream> using namespace std; int main(void) { std::cout <<"hello world!!!"; return 0; } when debug: 1>----...
[4 replies] Last: make a new .cpp and write it again..also u don't really need ''stdafx.... (by programmeraie125)
print + if number is positive
 
How do you make a positive number, that, if you print it out, also has a + infront of it, for example: int a = 4; cout << a; prints "+4"
[3 replies] Last: Include <iomanip> and do int a = 4; cout << showpos << a; (by Peter87)
MySQL-Connctor linking question
 
Hello guys, I've added all 3 shared object files to my linker and also the static libary. But now my programm says (Yes, I can execute it) that: :error w...
[6 replies] Last: Well.. I found an other solution. I just added these shared objects to... (by Kmitska)
Problems with F6 button
 
Hi everyone. I have a small issue with the F6 button during run time of a console program. If the user press F6 the output on the screen will show Z^ and if...
[3 replies] Last: You should put error checking into your program. Never assume a read f... (by Peter87)
doesn't print out questions
 
i wanted to do like a get line to print out the text from a .txt file but after printing the first question and after answering, it prints out the next one but ...
[no replies]
August 2012 Pages: 1... 678910... 31
  Archived months: [jul2012] [sep2012]

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