Beginners - August 2012 (Page 27)

.h and .cpp relationships.
 
If I have a private variable in a header file, then it can only be accessed directly by the corresponding .cpp file, else it needs public methods to access t...
[2 replies] Last: The error is obvious because variables potable and nonPotable are not ... (by vlad from moscow)
Scanf
 
main() { float a; printf("enter a number ="); scanf("%f",&a); printf("%d", a); } it is returning 0. my question is it is reading the value of a ...
[3 replies] Last: It is an error to call printf with arguments whose types do not match ... (by Cubbi)
cin: clearing the buffer
 
If i use cin.ignore() , when i use getline(cin, var1) it will just forget about the first character in var1. Also, for some reason, cin.ignore also makes co...
[3 replies] Last: I've heard of cin.sync(); n dint know if it'll work. (by Aceix)
help with constructor and setter.
 
consider the following program: #include<iostream> using namespace std; class variables { int m_number; public: ...
[5 replies] Last: He means there's no constructor that accepts an int argument in the ... (by closed account zb0S216C)
(Win32 Console project) Can't think of a good title here
 
The source is bellow. There is an error I fail to understand and to fix. This is just a small unscramble the word program I began. #include <iostream>...
[8 replies] Last: Glad I could help. (by MaxLascombe)
C++ String Program HELP
 
Hi I have very little knowledge of programming. Please help me with this program. 1) Sholey Program In Ramghad there are 100 people including U U are a foo...
[3 replies] Last: char a ; Int is for integar. (by Bobby94)
"new"?
 
Alright, so I'm sure this question has been asked a million times, but I was wondering about the "new" keyword. I get that it allocates new memory space or what...
[6 replies] Last: [quote=Framework]The only downside to this approach is the potential f... (by Disch)
bad_alloc exception. Need help.
 
I am making a simple program where I store and load binary data for objects However it keeps crashing and it throws a bad_alloc exception and I do not understan...
[9 replies] Last: A char array is already what read/write expects, so you don't need to ... (by Lowest0ne)
Tracing a function reference
 
int main() { int a, b, c; void changes (int &, int &, int &); a=3; b=-5; c=2; cout<<a<<" "<<b<< " "<<c<<endl; changes(a,b,c...
[3 replies] Last: ¿wouldn't be simpler to just use a step by step execution trough a de... (by ne555)
by nyfer
generate a set of items
 
hey guys i have data as follows I1 I2 I3 I4 T1 1 0 0 0 T2 0 1 1 0 T3 1 1 1 1 T4 0 1 0 0 i am inserting the elemeents ie 0's and 1'ns ...
[no replies]
I NEED HELP PLEASE
 
I need help ! needs to do an aircraft bombing game and i dont know how to create columns and rows please help! do note i dont want to use cout << thanks! pleas...
[no replies]
by mahiya
guys please help
 
Given the following program, show the values of the array in the figure: int main() { int values = {3}; // <--------------- Array created for(int i = 1; ...
[3 replies] Last: the values are assigned in your program but you didn't order the progr... (by AkramIzzeldin)
or problem
 
Hi I am trying to get around the use of "||". In the below code, the "while" line is giving me problems. #include <iostream> using namespace std; int ma...
[3 replies] Last: Thanks Peter87 and Vlad from moscow. I can see I am not using it righ... (by Weighbridge)
by nyfer
apriori algorithm
 
hey guys please help in coding apriori algorithm. i dont know how to go about it. As of now i have done this much. Please guide me. thanks #include<iostre...
[no replies]
by zkl
FOR loop stuck help
 
Solved
[4 replies] Last: You shouldn't delete content from your post like this. http://www.cplu... (by eklavya sharma 2)
by Ralden
Looking for info on making an imagine with markers
 
Hello. I am very new to C++ (only been at it a few days) and I am interested in making something, but don't know where to start. I am fairly comfortable with ...
[1 reply] : Try to search for some library (i would say 2D graphics library) for e... (by gelatine)
by nyfer
over loading matrix operations
 
hey guys i have done c++ program to overload operators for matrix. it works fine when i hard code the rows and cols. but when i take from the user it doesnt wor...
[11 replies] Last: yea thanks, now its working :) (by nyfer)
horoscope
 
we're making a simple program for a horoscope and we are asked to calculatethe year by getting only the 2 last digits in the year of birth.. how can i do that i...
[5 replies] Last: i got this code for min-max..but what if instead of 10, the user would... (by hennamae)
error with the code... help out
 
here is the code that takes two arrays(with no two elements of array same) as input and outputs a third array which is the union of the two arrays. i.e the thir...
[5 replies] Last: Try the following realization of the function int uni( int c , int a... (by vlad from moscow)
by Zu007
How to make scientific calculator in OOP c++
 
my project is scientific calculator in OOP c++. i'm performs like this(e.g sin(2+5-4*9/1))calculate and ans me. How to develop plz give examples.
[3 replies] Last: The amount of code that goes in varies on the quality of the calculato... (by eklavya sharma 2)
August 2012 Pages: 1... 2526272829... 45
  Archived months: [jul2012] [sep2012]

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