Beginners - February 2014 (Page 54)

by alsade
compiles but not working...help plz!!
 
this program compilation succeeded but it doesnt work. i guess it has something to do with the assi...
[3 replies] Last: Other than the fact that you assign to the object that is supposed to ... (by cire)
Problem
 
#include <iostream> #pragma hdrstop using namespace std; int fun(int x){ return x*x; } int main ()...
[7 replies] Last: I need to find out all highest square values from 75 to 0. And I have... (by mutexe)
my set value member function set data member values but the get function return default values
 
why does my get function return the default member values and not the values my set function set da...
[1 reply] : Should you be calling cset.setaddcompnum instead on line 96? Edit: ... (by kevinkjt2000)
Logic Error
 
I have created a program that creates a loan amortization table. It works but there is some problem ...
[1 reply] : ((12.035 / 12 * 880) + (0.035 / 12 * 120)) This formula gave me the co... (by kevinkjt2000)
by AmitH
Ampersand in String
 
Hello everybody, Until now, I thought that ampersand (&) is used to display the memory address. ...
[4 replies] Last: Let's phrase it so: The stream (cout) 'knows' what a string is and pri... (by coder777)
I'm not getting dowhile loops
 
Write your question here. #include <cstdio> #include <cstdlib> #include <iostream> usin...
[4 replies] Last: Thank you all so much! Sorry, my condition that i think you were all h... (by cplusone)
Why can't my derived class use a setter inherited from the abstract base class to change the value of a private member?
 
I have a public derived class called Rectangle and I'm trying to have a virtual function in Rectangl...
[8 replies] Last: You're welcome :) (by MikeyBoy)
by alsade
how to initialize array of objects during declaration?
 
i created a class : header: class employee{ char name ; unsigned int salary; public: emp...
[1 reply] : #include <iostream> struct X { X( int i, char c ) : i( i ), c( c... (by nvrmnd)
Confusion about function call syntax
 
I am using this tutorial for SDL: http://lazyfoo.net/tutorials/SDL/04_key_presses/index.php. I am re...
[4 replies] Last: So when it evaluates if init() returns false it also calls init() at ... (by MikeyBoy)
copying data in arrays
 
I have to copy data from locations of one array in to another array, for that i am calling function...
[2 replies] Last: thanks (by amitk3553)
difference in dates
 
How do I calculate the difference in date? e.g 8/31/2110 - 2/27/1977 = 48762 1) number_...
[no replies]
Out-of-bounds access (ARRAY_VS_SINGLETON)
 
Need little help.. #include <iostream> int main() { int bit = 1; int init = 0xf ^ (1 << bit)...
[2 replies] Last: Somebody told me this and I am agree with this alternative.. You cann... (by bhargavah)
Resource leak..
 
#include<iostream> int* func_b() { int *c = new int; return c; } int main() { int* b = fun...
[4 replies] Last: Also FWIW, there is no need for dynamic allocation in this example. f... (by Disch)
by jwilt
array filling
 
How do I store "46123" into an array that holds up to 30 digits? with the numbers going into the arr...
[7 replies] Last: the input file has strings of numbers but I think I can make it work w... (by jwilt)
can't figure out why i'm getting a segmentation fault error
 
while(fin >> inCode) { if(i < 1000) { if(inCode == 9999) ...
[1 reply] : Because you are probably accessing out of bounds on your array. If you... (by firedraco)
Bank account program while loop error
 
I need to add the ending balance to the new balance for 12 months with a desired interest rate using...
[no replies]
Can't get this loop working!
 
***I got the functions working, but the loop still isn't. Is there a type of loop that will terminat...
[3 replies] Last: Can't believe I missed that with operator precedence... I got the func... (by chandeliho)
Need help with using arrays and vectors in functions
 
Hi, I need to put some equation into array(located inside function). This equation was made inside c...
[3 replies] Last: Ok, so I put the whole thing under one main function and now it can be... (by ezechiel)
by Chubby
expected unqualified-id error
 
int main () { int first ; read_array (first,SIZE); } void array (int read , int size1) {...
[7 replies] Last: This isn't really the type of place to be asking these types of questi... (by Computergeek01)
by GGG
Simple text editing program
 
I got a little bit of trouble creating a program that edits text in C++. Keep in mind that I'm still...
[3 replies] Last: ... but I'm really curious why it doesn't work like that. Because o... (by Computergeek01)
February 2014 Pages: 1... 5253545556... 60
  Archived months: [jan2014] [mar2014]

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