Beginners - September 2011 (Page 43)

what is wrong with my randomizing a number?
 
im just trying to generate a number 1-4, declare a 'creature' for that number, and then display its ...
[1 reply] : If generate_random(int) returns an int, then you should have assigneg ... (by piotrekd)
by wasabi
getting bad_alloc from new
 
I'm running a program and am getting a bad_alloc exception from new . The problem is not that I've ...
[7 replies] Last: Just found my error. In a previous part of the function, I had a stati... (by wasabi)
can you help why wont this compile? help
 
#include "stdafx.h" // This is for MY compiler remove this if the program does not compile. #inclu...
[5 replies] Last: You can omit the stdafx header by deselecting the Pre-compiled header... (by closed account zb0S216C)
OR Operator
 
This may sound a bit absurd but how the heck do you get the OR operator character on a British layou...
[1 reply] : Erm nevermind. Turns out although the symbol is on that key it only o... (by myristate)
New with classes. Could someone please look at this prgm.
 
I'm trying to write a program using classes (you don't need classes to write this program but I want...
[1 reply] : Could someone please comment on my code. I want to know anything wrong... (by bool maybe)
Monthly Payments
 
The monthly payment on a loan may be calculated by the following formula: Payment = (Rate * (1+ra...
[4 replies] Last: You can easily do that with right manipulator. Its in the link I gave ... (by Undeclared)
by PeterK
Write 2D Array to binary
 
There are a lot of tutorials and stuff about how to write data to a .txt, but none of them really he...
[10 replies] Last: Well, everything works. It saves the files and correctly loads them ag... (by PeterK)
specify to have dynamic size of a value
 
For example, I'm creating a class of say pixel. This pixel could be part of a grey scale image that...
[4 replies] Last: I'm in a digital image processing graduate course. We can't use any i... (by closed account S8hvC542)
by Beep
Baby steps!
 
#include <iostream> using namespace hello; cout << "Coming from Python background, and I need som...
[3 replies] Last: C++ is indeed a very interesting language. Wish you best of luck with ... (by Undeclared)
How can I clean my screen?
 
I've created an application in C++ (I didn't think was necessary to post the code) and at a moment I...
[4 replies] Last: Thanks a lot friends! Nice forum, by the way! I am glad to be part of ... (by CosminNTG)
Template class file organization
 
Hello: I am new to template programming and trying to implement a simple toy template class with ...
[4 replies] Last: Thank you Shacktar. The code is compiling with the separation model. ... (by hoplalos)
question about file proccessing
 
Hi guys. Can anyone explain me this: #include "stdafx.h" #include<fstream> struct A { str...
[no replies]
Convert Image to Matrix
 
I want to convert image(ex .bmp or .jpg ...) to binary matrix. When image was loaded,I want to conv...
[1 reply] : In Windows you can use GetDIBits() (http://msdn.microsoft.com/en-us/li... (by webJose)
i got the very basics, how sould i continue?
 
Hi, I have been reading a book and helped me allot! So far i have covered: -Types, Variables,...
[6 replies] Last: Thanks for the compliment :) I have just started working on it and wou... (by Undeclared)
by jrmma
assignment operators
 
is the following code correct?: if(0!= variablename) { ... }
[6 replies] Last: OK Thanks a lot.. So basically they are the same right? " if(0==var) "... (by jrmma)
learn more pointer.......
 
#include<stdio.h> float * display(int,int); int max=5; int main(){ float *(*ptr)(int,int);...
[1 reply] : Because of this: ptr=ptr+1; ptr is a pointer to a function. What... (by Moschops)
Calling variables from other functions
 
Hey guys something I'm not sure how to do is to use a variable defined in a function in an entirely ...
[6 replies] Last: That means that there's no matching function prototype in the class de... (by shacktar)
function.....
 
#include<stdio.h> #include<conio.h> float * display(int,int); int max=5; int main(){ clrscr()...
[1 reply] : 1. Don't return pointers to local objects. The objects go out of scope... (by helios)
basic 4 slot seat reservation
 
hello, i'm trying to program a 4 slot restaurant table code with a bool loop. I do not know how to ...
[3 replies] Last: ok! i got it down! turns out it was in the next chapter of my book. ... (by maharris)
by hydroJ
Function prototype problems
 
not exactly sure what I am doing wrong here... advice? //****************************************...
[4 replies] Last: that did it. thanks. (by hydroJ)
September 2011 Pages: 1... 4142434445... 48
  Archived months: [aug2011] [oct2011]

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