Beginners - February 2015 (Page 49)

by Fedeb
Overloaded operators
 
Hi, im reading Cplusplus tutorials and i dont fully understand why does the new definition of operator+ for adding vectors needs only one parameter and not two ...
[4 replies] Last: Thanks! your explanation help me a lot. (by Fedeb)
by h4ever
What design to choose when dealing with images? Interlacing
 
Hi. I am staring to learn how to use libpng, libjpeg and libjpeg-turbo libraries. I have noticed they use common style: First we declare some basic pointers ...
[no replies]
Accessing a pointer object member variable
 
Hello, I am wondering what is the difference between ptr->age = 11; and (*ptr).age = 11; using the class class person { public:...
[2 replies] Last: As LB said, the only difference is what keys you press. Standard defin... (by MiiNiPaa)
Function calling in another function help
 
I'm making a guessing game where the program has to guess the user's number, so it's kinda backwards than some of the guessing games I've seen. I'm having troub...
[1 reply] : Why the midpoints? Shouldn't the logic be: Choose guess from [low-hig... (by keskiverto)
Why isnt this working
 
This code come from Bjarne Stroustrup's programming and practice book. Why isnt this working. Im using Visual studio 2013 #include "std_lib_facilities.h" int...
[2 replies] Last: false alarm guys, i didnt even had this std_lib_facilities file in my ... (by etrusks)
solved
 
done
[4 replies] Last: Which one is better? I don't think there's much difference with th... (by cire)
Lost in the Loop
 
First I want to thank all the support for the community, you are all amazing. My issue is that when I run this program, it does not accept the "area" INT, is st...
[9 replies] Last: Thank you, using the //comments makes a world of difference. (by my228rocks)
Vector to array
 
Could somebody show me how to change this tidbit of vector code to a dynamic array? vector<char> storage; for (int i=0; i < pairVector.size...
[2 replies] Last: std::vector<> is an optimised, resizeable dynamic array. There is no... (by JLBorges)
Passing 2D array into function using pointer
 
I've written the following program. I am trying to pass the 2D array into function using pointer and change the value and reassign it into the array. But it ...
[3 replies] Last: Hi, here you go #include <bits/stdc++.h> using namespace std; tem... (by closed account SECMoG1T)
by shola
Spare a Square Problem. Need help to figure it out.
 
1) Use a function that generates and returns a random number between [0,1] which can be used to determine whether a patron is a big-chooser or littlechooser. ...
[no replies]
by Dojo
HELP HELP HELP !
 
hi guys,i am very new to this site and most of all im very very very very very new to programming and c++. i started learning it only week ago but reading pages...
[3 replies] Last: Every compiler is slightly different, but somewhere in your compiler's... (by Ganado)
by VVS
int main ()
 
how do you separate one program from another on a single file? i have to submit a hw problem that is 3 parts and I'm trying to send one cpp file but i current...
[3 replies] Last: ok nevermind i got it!! thank you!!! (by VVS)
Negative arrays (Homework due Wed)
 
Hey, all. Sorry to return so soon, but I need help. Here is my assignment. Recall that in C++, there is no check on an array index out of bounds. However, d...
[1 reply] : Nevermind. I found a workaround. (by herooftime1000)
Why isn't my code compiling?
 
I am trying to write a program that asks users for inputs mass and acceleration to calculate the force and then print it out. I don't know why it isn't compilin...
[4 replies] Last: I would place the executable code for gathering the data from the user... (by OUIJ)
by anup30
Maximum Size of Recursive Fill
 
my following program fills continuous elements in 2d array recursively. but it worked only for N<180. why doesn't it work for bigger size? // Recursive fi...
[14 replies] Last: is there any library facility (container?) which provides random acces... (by anup30)
by Xolin
Displaying the instance name of a struct / class
 
So I'm getting into objects and I have a situation where i want to display the name of the object. So let's say i have a critter named stan: struct crit...
[2 replies] Last: derp..... thanks! (by Xolin)
pointers to functions.
 
im completely new in c++ i was trying to write a function which returns mod of difference of two input numbers ie.(z=|x-y|) im having compilation errors.can som...
[3 replies] Last: I don't think there's any difference for functions, it just saves you ... (by tipaye)
Sorting linked list
 
Our case study was to create a 2d array that uses sorting searching and linked list and apply classes, functions, structure and pointers so I am sorry I made th...
[no replies]
Help with inline functions
 
Hi, I'd like to understand how inline functions work. I've read that you have to fully define the functions you want to inline before you call them. That's be...
[11 replies] Last: Read whole sentence. The hint is ignored, not the keyword. if that w... (by MiiNiPaa)
by Irhcsa
Class Error
 
Getting the error: "Error: too many initializer values" Can someone help me figure out what I'm doing wrong? Code: #include <iostream> using namesp...
[5 replies] Last: I thought variables put above would be universal for the entire progr... (by coder777)
February 2015 Pages: 1... 474849505152
  Archived months: [jan2015] [mar2015]

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