Beginners - April 2010 (Page 33)

Array of my class in dynamic memory - return problem
 
First of all, I'm sorry if the title isn't the best one, I couldn't think of a better one without just explaining the whole problem there. I'm a very, very e...
[2 replies] Last: Ehm.. of course, makes sense, I can't believe I missed that. I did it ... (by Metalspy)
by Aseel
getline function
 
Hi Programmers ^_^, I always face same problem with getline. Could you please explain to me what I'm doing wrong. I would be very grateful. #include <i...
[10 replies] Last: I understand it now clearly. Thank you Maikel . finally I wouldn't ... (by Aseel)
Beginner Exercises: evaluation
 
I'm new to C++ and I've just solved a few beginner's exercises (found in http://www.cplusplus.com/forum/articles/12974/page9.html). If anyone has some time mayb...
[9 replies] Last: Somarl: You can sort anything that has a "pointer-like" interface (an ... (by maikel)
by korg
Const cast
 
int main() { const int i = 0; int* j = (int*)&i; // Deprecated form j = const_cast<int*>(&i); // Preferred // Can't do simultaneous additional cast...
[2 replies] Last: Thanks :) (by korg)
Substitute Words During Runtime?
 
Is there a way to substitute words into the code like #defines based on variables during runtime? I want to be able to set the text colour of a console applica...
[2 replies] Last: Thanks! I know what I was doing wrong now, I was trying to make an enu... (by kevin06s)
by xeyide
Temporary object returns
 
What is the difference between using the a "temporary object" and creating a new object on a local scope? For example, lets say we have an Object with two in...
[3 replies] Last: Some discussing about returning an object: http://stackoverflow.com... (by screw)
void problem
 
i found this on one of the archive of the board but the program shuts down then i input a product #include <iostream> #include <iomanip> #include <string...
[8 replies] Last: wow you made it work!!!! thx a lot!!! (by baphomet90)
writing C++ plugins for Adobe After Effects
 
I'm looking into writing custom plugins for After Effects. I've started looking over some info about C++, in addition to the Adobe After Effects CS4 SDK. I was ...
[no replies]
adding switches
 
is there a way for me to add swtiches? if i can't what are my other options can you give me an example? #include <cstdlib> #include <iostream> using na...
[1 reply] : I'm not entirely sure what you're trying to do. What do you mean by 'a... (by closed account Lv0f92yv)
Hang Man...
 
I've recently decided to take a stab at creating a hangman program... Right now my program prompts the user for the size of the word he/she would like to solv...
[1 reply] : http://cplusplus.com/reference/string/getline/ http://cplusplus.com/r... (by blackcoder41)
Can't use << on a string variable?
 
Shouldn't this be allowed? I'm using Visual Studio 2008 and getting the following error when I try using string variables with the << operator. error C2679: ...
[2 replies] Last: #include <string> (by blackcoder41)
Randomly select a prime number
 
I was wondering if they was an easy way to select a prime number at random. For example, rather than having a rather large array of prime numbers between the se...
[4 replies] Last: Thanks people. The replies really helped out. Once again thanks a lot! (by danBarker)
using the 0x standard
 
If I am using the gcc compiler am I able to use the 0x standard library? If so what is it called(e.g. is it called -lstdc++0x)?
[8 replies] Last: This looks like the answer to my question: http://gcc.gnu.org/onlined... (by closed account iw0XoG1T)
by gcr114
Formula not Producing Proper Output
 
#include <iostream> #include <cmath> using namespace std; double calculate_radius(double radius) { while (radius <=0) { cout<< radius <<" is not...
[no replies]
Converting an Integer Array to an Integer
 
I have an array of integers that I need to convert to a single integer. Is there a function built into C++ that I can use to do so? If so, what is it called and...
[3 replies] Last: There are several ways to do so: 1. string way: use a stringstream ... (by maikel)
by tysonc
Std Deviation
 
I posted a question about a loop in here a few days ago that wouldn't work correctly but now I'm having a bit of trouble with it again. It calculates the avera...
[5 replies] Last: Hmm so I was playing around with some stuff and I removed the "sdtotal... (by tysonc)
by broot
templating a linked list
 
I have a doubly linked list class (and a node class). I've tested both their functions in main() and everything works the way it should. However, I'm now tryi...
[2 replies] Last: ty very much (by broot)
by dqcyd
Overloading operators = problems
 
// example on constructors and destructors #include <iostream> using namespace std; class CRectangle { int *width, *height; public: CRectangle...
[3 replies] Last: m4ster roshi and jsmith, Thank you very much for your helps. I defi... (by dqcyd)
Determine time between two Dates
 
I'm working on a warranty database and in need of a help on determining if a particular warranty is out of date. I've come along the code of determining by t...
[3 replies] Last: After messing with the code, I made my own time difference function to... (by Liger XT5)
bouncing ball (due by 5pm
 
Hey all. My first post here. Currently taking a programming course and having a little trouble getting the right code sorted out. the problem is to create a ...
[no replies]
April 2010 Pages: 1... 3132333435
  Archived months: [mar2010] [may2010]

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