Beginners - April 2010 (Page 26)

++x vs x++
 
My instructors never really explained when one or the other would be more efficient... I always code x++ Is there any time or situation ++X would be bette...
[9 replies] Last: That is because XSetArg () is often a macro. (by Duthomhas)
Friend declaration and qualified-id
 
Hi there! I have question about friend declaration. class X; class A { friend class ::X; friend class X; }; I don't know why, but if ...
[10 replies] Last: There is a large section on unqualifiedname-Lookup in the C++ standar... (by john891)
Do booleans start off true or false?
 
Or do I have to set what they start off as? If i DO then how do I set all values of a 2 dimensional boolean array to true.
[7 replies] Last: prefer std::fill (or std::fill_n) to memset http://cplusplus.com/re... (by Disch)
by tre84
Shuffle function doesn't work
 
I have an array which creates a deck of cards from 1-52. The array is numbered so it would be: card =1,card =2 etc. Below is my random function and I keep ge...
[7 replies] Last: here a hint build a deck what you want in it. Then shuffle it. this s... (by DrakeMagi)
by LiLi
changing the objective function
 
Hi, I have a GA source code in C and I want to change its objective function. My objective function has a lot of details and I have opened that file in my pr...
[3 replies] Last: Code tags, please. There's no way that can be readable, otherwise. ... (by helios)
Can't figure out loop to set all values in boolean_array[15][30] to true!
 
This is what I came up with but it just crashes when I run it. Any ideas! Please help! #include <iostream> using namespace std; int main() { ...
[6 replies] Last: Should work fine. (by tummychow)
Exercises (1,2)
 
Hey everybody, I have a beginner's C++ book that I am very happy with, but it doesn't really have any exercises. I was wondering if anybody could point me in th...
[29 replies] Last: Ah, ok. This is all very interesting stuff. I can't believe I used to ... (by DeadH34d)
Search Using Array.
 
Hey, i was reading up on find function and i came across this line. size_t find ( const char* s, size_t pos, size_t n ) const; Correct me if im wrong, b...
[3 replies] Last: int str_count(string w , string f) { string cw = w; int countx =... (by DrakeMagi)
Class inside its parent class container
 
First,hello everyone :) I started making a game in C++ and i'm stuck at this point. 1. I have class GObject (thats game object class,with x,y coordinates,...
[3 replies] Last: (default inheritance for classes is private) (by jsmith)
Listing all variables in a namespace
 
Hi, I've googled, but can't find the answer. How do I list / find out all the variables used in a namespace? Specifically, I'd like to know the variables i...
[3 replies] Last: Thanks for the help. I found a few solutions. Like choisum says, Do... (by keikiwai)
OOP : Programming
 
Seriously need help since that my work is to close upon reaching the deadline in less than 6 more hour's time ... :( i have this big proble...
[5 replies] Last: well, about the problem i'm trying to allow clients of the class mak... (by rachel0630)
stdlib.h file
 
Where can I find this file stdlib.h, your folder?
[1 reply] : Uol. Is ok. I found the files in this folder right now: C:\Program... (by dokfiler)
by wincry
Strange Vector problem
 
Hi Please anyone check my code to see what is wrong with it. I am stuck please help. First i am parsing a csv file using boost tokenizer. I have a test csv...
[no replies]
Multidimensional Arrays
 
I have an assignment that requires multidimensional arrays. I have succesfully inputted the values, but I am not sure how to do the rest of the processes with t...
[1 reply] : I think this would be the correct code //Setup standard environm... (by CuddleBunniezzz12)
Using a function input to define the length of an array
 
Hi, I need to create a function that will evaluate a polynomial at a point x, with the inputs of the function being the coefficients of the polynomial, the o...
[2 replies] Last: I figured it out, I had to create the array using "new" (by frankthetank)
Header File Not Compiling
 
Ok so i'm VERY new to c++. I have looked thru endless search results, check thru 9 pages of posts, googled this problem, and cant seem to find anything. please ...
[3 replies] Last: thank you very much shadow addict. you solved BOTH of my problems. my ... (by newtocpp)
how do i declare a function with return type vector?
 
how do i declare a function that returns a vector?
[8 replies] Last: thanks guys, its cool to know that i can do this. however i did not kn... (by jinjin12)
C++ confusion on how to find the root, by bisection, in an array.
 
"Calls a void function that uses the bisection method to determine the value of c. Because there are two values of c to determine (one for the diabetic and one...
[1 reply] : Please edit your post to include [co de] tags so that the code is for... (by PanGalactic)
by Tripic
Vector Problems
 
Ok my vectorz<player> pl works great but i think the rest are causing this error Expresion Vector subscript out of range it says its on line 779 but thats the...
[2 replies] Last: I appreciate the use of code tags but please take the extra effort of ... (by kempofighter)
SDL build Error
 
I'm just now starting on SDL, and right now i've been running into a problem that doesn't want my program with SDL functions to compile. This is the error I got...
[2 replies] Last: Nevermind, I've figured it out... I misspelled this: -lmingw32 -lSDL... (by Ryan15000)
April 2010 Pages: 1... 2425262728... 35
  Archived months: [mar2010] [may2010]

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