Beginners - February 2011 (Page 19)

What is an array?
 
Could anyone tell me what an array is, what it is used for, and how to use it? I appreciate detail. Thanks!
[6 replies] Last: Note that an array is NOT a pointer, it sometimes decays into one. (by rocketboy9000)
string array funcion
 
Hello world, that`s me, again :D I have this code string LOAD_ITMS(string path, string IDs ){ ifstream acc; short int i; int help...
[5 replies] Last: Make an array a function parameter and manipulate it directly inside. (by Mercurialol)
"functions"?
 
my teacher is asking us to: "ask for the radius of the circle, send this radius to a function called circleArea(). circleArea() should calculate and return ...
[3 replies] Last: The cin's correct use is: cin >> radius; look at the >>. ... (by andrezc)
by GulHK
vector unique elements
 
Hello every one Could any one please help me remove redundant enteries in a struct type vector based on some condition. The program I have written is as foll...
[1 reply] : look at this: http://www.cplusplus.com/reference/algorithm/unique/ (by coder777)
Sorting issue
 
Can you guys take a look at the below? I am to calc netpay given a in file and sort by netpay. The calc's work out, but my netpay doesnt sort. Can you give me s...
[9 replies] Last: Any thoughts guys? (by cplusplusrookie)
by plokij
how to run makefile...
 
Hello again everyone! I'm having a hard time executing a makefile that was created by my professor. In a directory, I have main.c, pair.c, pair.h, prep_defs...
[12 replies] Last: thanks a lot.. :) (by sanji2011)
Back with another problem -___-
 
so for some odd reason, in SFML i dont have the Clear() function. I cant change the background color of the screen without it. Anyone know how to get it or what...
[1 reply] : How does that 'not having Clear()' look? (by hamsterman)
by higuy
Creating a driver.cpp file
 
I need an explanation on the basic structure of a driver for a class I've created. The header file is stored in the "header files" folder of my project, and th...
[4 replies] Last: My professor calls it a driver (I guess incorrectly?) Not so much... (by Moschops)
by tonnot
About create an instance of a external class.
 
I dont know how to do this. I have my classA with its .h and .cpp file. I have my classB with its .h and .cpp file. ok, into myclassB, I want to have Cla...
[6 replies] Last: Thanks AThar ( and thanks for your patience...) Your explanation is g... (by tonnot)
by rekson
How to return an array in a class's get function?
 
I'm writing a polynomial project that requires me to utilize classes. Problem is, I have the polynomial stored in two arrays in the class, one for coefficients ...
[2 replies] Last: #include <vector> class Polynomial { public: void coefficie... (by krishnendu)
functions problem, I dont know how to write the code
 
hello, this is my first ever comment on the forums. I am stuck on a piece of coding and not sure how to get around it. I know whats needed (sort of) but not ...
[4 replies] Last: right, thanks very much for your help, i appreciate it :) (by only1skingle)
Anyone Use SFML?
 
For some reason i dont have the Clear() function in SFML for VC++ 2010. I cant change the background color because of it. Any suggestions?
[1 reply] : What do you mean you don't have it? Did you modify the SFML source ... (by Disch)
unusual return
 
Hi, I am trying to understand how a char * const can return into an int. specifically, when you use the strstr function if you are trying to return a ...
[4 replies] Last: just looked up ptrdiff_t "This is a signed integral type, and as such ... (by danaigo)
Overloading << outputs address and not values?
 
I have the following friend function in my class header file: ostream& operator <<(const ostream& osItems, const OListType<T>& items) { for(int i = 0;i <...
[6 replies] Last: Oddly enough.... I changed it to this: friend ostream& oper... (by bardicer)
SQUARE ROOT AND CONDITIONAL SWITCH
 
Hi guyz, I wanted to write a program to calculate the square root of any number but it wasn't easy with me somebody help me. Also i'm having difficulties with ...
[6 replies] Last: Finding roots: 1: http://ocw.mit.edu/courses/electrical-engineering... (by Intrexa)
What does this error mean?
 
im using SFML and this error keeps coming up. I compiled a project in it before perfectly but when i try to do this and make a window i get errors: 1>main...
[4 replies] Last: Looks like you haven't linked the SFML libraries. Make sure you do tha... (by firedraco)
is there a time i would not use
 
just wondering if there was a reason to not use using namespace std; none of the tutorials go over this part.
[2 replies] Last: thanks (by danaigo)
?? understanding random # generation code
 
srand(time(NULL)); I don't get what this exactly does. I have read that it accesses the computers clock, and converts to seconds. I just don't quite understand...
[3 replies] Last: C's random number generator is essentially this: rng(N+1) = rng(N) ... (by jsmith)
by Saph
Define namespace::operator<< in chained expression
 
Hi, Im trying to figure out a smoother way to solve this problem: cout << "Value of enum: "; My_namespace::operator<<(cout, d); cout << '\n'; The...
[2 replies] Last: You are right, the code compiles fine now. Thanks for clearing that ou... (by Saph)
Class Template and Variable Constructor?
 
My current code is at http://codepad.org/Eyo42441 I have a class template OListType. I want to create an instance of this class that will hold variable inpu...
[13 replies] Last: But what is the type of num? (it should correspond with your list choi... (by ne555)
February 2011 Pages: 1... 1718192021... 43
  Archived months: [jan2011] [mar2011]

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