General C++ Programming - October 2012 (Page 48)

Need help creating pointer in a class that points to a separate variable.
I'm trying to find a way to create a pointer inside a class that points to an image variable that ha...
[3 replies] Last: Ah ok thanks. I did not know I could use new from outside the class. T... (by Tyler Hummel)
Controlling the computer with C++
Hi everyone. I want to write a code that I can turn off the computer writing to the screen "close". ...
[6 replies] Last: Thanks for your help but your code still does not work. I Think there ... (by Xphysics)
Calculating sin(x) with the power series
Write a program that calculates the value of sin(x) from the power series x - (x^3/3!) + (x^5/5!) - ...
[no replies]
Help with Array
I'm working on a Genetic Algorithm project and need to write a code to do the crossover operation. I...
[no replies]
by leoo
Random header, checksum?
I had a program here that I wanted to analyze. The program has a random header all the time, but the...
[3 replies] Last: OOoooohhh... right right. Whoopsie. (by Disch)
Need help!!!!! Please please please
Write a boolean function that accepts a positive integer parameter from the caller and returns true ...
[1 reply] : Break large projects into smaller steps. I would suggest you start b... (by Disch)
cin.peek problem
Hi, say I am using stringstream to get three inputs in a line, and I want to check if the first t...
[1 reply] : I am not sure why you are trying to bend the usual rules for this one ... (by Duoas)
by vinu
Passing macros as arguments
I am need to pass #define macro as a definition. Is there a way to do it? have typed a sample code...
[3 replies] Last: Thank you.. (by vinu)
Dynamic memory used in function
Suppose I have the following code (I saw this kind on the Internet): class foo{ public: int ...
[5 replies] Last: You could have checked this yourself by making a destructor that print... (by closed account 1yR4jE8b)
RSA implementation using GMP library in c
I'm implementing rsa encryption using GMP library in c. I get a seg fault on line 44 while trying t...
[no replies]
Quick Question on Loop
If I have a Do, While statement. How do I make this repeat and output ten times? I know it is repea...
[4 replies] Last: How about if I ask this at the end? How to repeat the whole shabang? ... (by skittlesaddictx50v)
by edimel
c++ graphics.h me.. Devise a c++ program to illustrate a scene or scenes using graphics, animations a...
[3 replies] Last: i haven't been very much into graphics and stuff, but sdl should be en... (by ritka)
Code that returns the sum of the series 1! +2! +n!
I'm having trouble with the code below. I'm supposed to write a function but I wanted to get the bas...
[1 reply] : You must return 0 at the end of your int main() function. (by hackinghorn)
trouble with loops
I cannot get these loops to work correctly, I am a beginner. Can anyone help me out? Thanks in advan...
[4 replies] Last: the program needs to store the name of the student and the quizzes the... (by hunterb24)
Memory Management
Hello, I have a general question about memory management. I know that one can create custom const...
[7 replies] Last: So am I to understand that once I delete this pointer the object which... (by vckngs7)
by ing
stuck with vector processing
Hi, I think I might had put too difficult question in beginners section, please have a look. Hope...
[no replies]
Polymorphism issues with arm-none-eabi-g++/gcc
The following code runs great when compiled with Code Composer Studio(on a TI ARM chip) and avr-g+...
[no replies]
How come size of this class is 24b
#include <iostream> using namespace std; class base{ public: int i; }; class derived1 ...
[5 replies] Last: Ah, that's not the best book in the world. In fact, it's a terrible bo... (by closed account zb0S216C)
calculate input text
Hi. How can I calculate some input text like below? "23*4-54/3" What sould I use? Recursion or St...
[4 replies] Last: Yes I can do that. I can parse input and put its tokens in an array of... (by majidkamali1370)
Static and inheriting static variables. How does it work?
So I want each class to hold an image unique to that class. The system I have where class instances ...
[4 replies] Last: > You still have the advantage of the static variable in that you are ... (by JLBorges)
October 2012 Pages: 1... 4647484950
  Archived months: [sep2012] [nov2012]

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