General C++ Programming - May 2011

Exception-throwing Functions
 
I'm in need of assistance. I have a function that allocates memory for the specified amount of elements, of the template type. However, I want the function to t...
[3 replies] Last: The exception should propagate up until it's either handled or reaches... (by closed account 3hM2Nwbp)
OpenGl inside MFC
 
Hello,I'm trying to create a MFC app with OpenGL. I followed a tutorial posted on CodeGuru(I can't find link to it, but if someone want it I will try to find it...
[no replies]
please help me soon!!!!!
 
I want to write a program that receive a mathematical expression including "tan","sin","cos","cot","ln","+","-","*","/","power""d_x(derivative)" and any other f...
[2 replies] Last: What kind of help? This is a rather large and involved project. If ... (by cnoeval)
Terminates loop by pressing enter
 
A program that takes input from user(in form of hidden characters) and compares it with predefined array.. then tells whether the entered input valid or inval...
[3 replies] Last: Is there a reason you're using something that is so out of date? (by Computergeek01)
Getting $(SolutionDir)
 
So, I went into the project properties, and added the macro for $(SolutionDir). How can I access that value from my program? I tried: std::string SolDir = ...
[12 replies] Last: Why don't you just put those files in the same directory as the execut... (by helios)
Optimizing in OS X
 
I am trying to speed up a relatively simple but computation heavy program which will be run and compiled using OS X 10.5 The version of GCC is: i686-appl...
[1 reply] : If it is not using all the cpu, it means it's waiting for some IO (fil... (by bartoli)
Nested for-loops via preprocessor
 
Hello dear users, I am currently working on a program simulating physics on a d -dimensional grid. For this, I need d nested for loops, which I do not know ...
[3 replies] Last: If you need the counters for each of the dimensions, that is rather si... (by webJose)
Alignment
 
how do i change some structure alignment for like 1, 2, 4 and 8 byte. i had some structure that i want to pass to an api but it only work with 8 byte structu...
[4 replies] Last: thanks for the link kbw :) (by StoneHeart)
A question using ifstream to open a file
 
In the following codes why I have to put "ifstream::" before "binary". Since the "open" is already a method of ifstream and I am also using std namespace why do...
[1 reply] : You should probably just use std::ios::binary. You have to qualify it... (by PanGalactic)
violation problem
 
First-chance exception at 0x013a28bc in Assignment 2.exe: 0xC0000005: Access violation reading location 0xfdfdfe01. Unhandled exception at 0x013a28bc in Assignm...
[4 replies] Last: nvm (by nanochan1)
problem with vectors (1,2)
 
Hi all.What I am trying to do is a program that calculates the area of a polygon. I divided my program into two subcodes.The first part computes the area, and t...
[37 replies] Last: I saw my mistake, I should have been very tired to miss "infile.open".... (by RachelAnderson)
class question
 
i am doing class. i need to create a dynamic array in stack on classes abc x ; <- is there a way to change 100 to a variable? my error is: ISO C++...
[2 replies] Last: thanks (by nanochan1)
by JCOPP
CHECK SUM Digits
 
Need some help with this calculation. I am supplied the keys and need to calculate the output I think you xor key 1 to key 2 then again with all "0's" but I...
[2 replies] Last: This is what was given to me but not sure..... In this descriptio... (by JCOPP)
What is the standard of this book
 
C++ How to Program Harvey Paul Deitel Deitel Has anybody read this book if so can you tell me what to read after this what level of a C++ prorramer you beco...
[1 reply] : It is impossible to progress beyond beginner with only a book. You ne... (by PanGalactic)
Exception Runtime_error : new operator with bad allocation
 
Hello everybody , I need to use exceptions for bad allocation of memory when I use files and pointers to files . I must use the "runtime_error" class . Give...
[10 replies] Last: Well as far as I am aware you either test for NULL and use (nothrow) ... (by anonymous23323124)
what is the problem here?
 
void DECROM()//function for conversion decimal to roman { int fnum,snum,dig; bool needFnum = true; bool needSnum= true; bool negCheck= true; whi...
[1 reply] : the range there, is just the empty class like this class Range{}; cla... (by asymptotes14)
String problem!
 
i really need help on solving this string problem. im new to vc6 so hope you guys could help me. anyway here is my problem. i had a string something like thi...
[3 replies] Last: ok i finally solve my problem. thanks for the reply. how did i solv... (by StoneHeart)
Building symbol table using hash table
 
I'm trying to build a symbol table using hash table. The general idea is int alpha; 2 int beta; 3 alpha = 0; // the alpha declared in line 1 4 beta = 0; //...
[1 reply] : It would be helpful if you could post your version! Speed also depend... (by onur)
Write to binary file
 
Friends. I am with the program segment below, and the following is happening. If I take a while ( in bold ) to see if the code exists, the program writes reco...
[1 reply] : It's hard to say without knowing what is the code for and when it is w... (by hamsterman)
sine wave
 
I have the following code that draws a sine wave in my window... void wavefunc(HWND hWnd, HDC hDC) { static double _x; int _y; _y = sin(_x/_freq)*_am...
[7 replies] Last: Cool. Better. But drawing the values on screen every time wavefunc()... (by webJose)
May 2011 Pages: 123... 32
  Archived months: [apr2011] [jun2011]

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