General C++ Programming - February 2012 (Page 2)

Avoiding a run time exception
 
Although it seems undoable, I will still give it a shot. Suppose you perform an addition operation whose result is too big to be represented by the 32 bits of t...
[1 reply] : You have to write your code so that overflows does not take place. If ... (by Peter87)
Linked List trouble
 
I'm having trouble with implementing a linked list Here is the .hpp #include <iostream> #include "linkedList.h" // Purpose: effectively "empties" t...
[1 reply] : In your header file (I think linkedList.h) you should remove the "#in... (by SIK)
by codrgi
best way to go about this?
 
i have a group of random numbers ranging from 1 - 10000 in a list, i want to arrange that whole list by descending order, what is the best ways to do this?
[5 replies] Last: Use sort() function. Assuming you are using STL's list and the number ... (by b2ee)
Troubles with nested ifs and bools
 
Ok so I have plenty of experience with nested ifs and bool values but for some reason, I'm not getting my code to do what I want it to. It's driving me crazy so...
[1 reply] : 1, where is the PegType originally declared? 2, where is the pasted co... (by b2ee)
by mono
char pointer???
 
Hi I have tried to figured out, but it does not work, please help. I know that I can do this to store char variables like words, but they are constant. con...
[4 replies] Last: "getline" and string. C++ provide many good methods than pointer, th... (by b2ee)
Game Of Life
 
hi I am trying to implement conway game of life. I am having errors when calculating value of neighbors The following is what i have implemented. Any suggest...
[2 replies] Last: Thanks for reply . formatted my code Line 61 - Line 77 I was trying ... (by anusha51)
Understanding Pointers
 
Hi, I'm having trouble getting the pointers idea (and I thought I finally had it right...). MyClass myClass; //This class only has a Letter* letters va...
[7 replies] Last: I managed to get what I wanted, but I'm wondering if it's the best way... (by Shakazahn)
not sure what could be wrong
 
ok, so i am making a cribbage game, i had it so it printed the first hand, allowed you to discard 1, and again for a second card, then the same for the second h...
[2 replies] Last: and the rest of it: void setstartercard () { ... (by Xendraw)
Unhandled exception.
 
I'm trying to load multiple textures like: void LoadGLTextures(const char * filename, GLuint &texture) { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, ...
[7 replies] Last: May you can try to catch the exception by "try - catch". Anyway, not b... (by b2ee)
Stack Overflow
 
Hello everyone! I am having a hard time fixing a stack overflow issue. I seem to have accidentally created an infinite recursion and I need a way out. I believe...
[12 replies] Last: I thought it was terminated via the recursion. Once k > n that functio... (by jsmith1992)
by jeezy
Help with boole
 
hey guys i need help with the boole i have an assignment in class and im pretty sure i have to use the boole in the programming code In the program i have to a...
[2 replies] Last: this is the logic i have for it /* main{ need to take a string ... (by jeezy)
Triangle Program
 
Hey guys, Im new to C++ and have a problem for class we are supposed to try. I need to have a triangle formed of characters that varies based on what the user e...
[3 replies] Last: Thanks for the responses. Im a little closer now. This may be a dumb q... (by th3fr4nchi5e)
The application was unable to start correctly.
 
I have recently change to using DevIL. I got the 64-bit download put the library files in the lib folder, the header ect. in the include/IL folder and the DLLs ...
[3 replies] Last: It could be program initialisation failure, such as a missing dependen... (by closed account zb0S216C)
Talking through USB
 
I'm going to start writing a program for one-way telemetry through the USB over the can bus. I'll have the can bus talking to a micro and then the micro spittin...
[no replies]
Infix to Prefix
 
Hello, I've made an attempt at converting infix expressions to prefix form using the shunting yard algorithm: http://en.wikipedia.org/wiki/Shunting-yard_a...
[1 reply] : Well I ended up changing line 23 to: while (!opStack.empty() && opSt... (by rem45acp)
Error message stating "Debug Assertion Failed". Can anyone help me find out why.
 
#include <iostream> #include <iomanip> #include <string> #include <cstring> #include <cmath> #include <cstdlib> ////////////////////////////////////////...
[3 replies] Last: string grade = 0; grade is of type string, not int, do this: string... (by clanmjc)
Reading number from file
 
I know this is a rocky problem but I can't seam to find a solution for it. I am trying to read a number (lets say 0.2) from file with the code below. #inc...
[4 replies] Last: I have found that my concerns are actually justified. In fact I have t... (by benbehr)
by m4wk
round robin scheduling algorithm
 
Hey guys. I am working on an assignment that will emulate cpu scheduling algorithms with an array of structs of process information. Right now I have FirstComeF...
[1 reply] : EDIT: this is solved. (by m4wk)
how to read csv files within .txt
 
Hi all, I have just started learning c++. I got a simple question, is it possible to open a batch of csv files within a text file format? or is there a way ...
[4 replies] Last: fstream manifest( "abc.txt" ); string csv_filename; while( getline( m... (by moorecm)
c++ postfix not working
 
C++ postfix not working? I have an integer called: int pID = 0; Inside my while loop I'm using pID++; to increment it. Sometimes the pID doesn't get incr...
[2 replies] Last: The problem was somewhere else in my code. I was forking off parents i... (by Stephen Miller)
February 2012 Pages: 1234... 43
  Archived months: [jan2012] [mar2012]

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