Beginners - February 2011 (Page 22)

by Dannk
c++
 
Please can someone help me solve this equation. square root of a^2+b^2 = c. thanks.
[5 replies] Last: double c = sqrt(pow(a, 2), pow(b, 2)); Assuming both 'a' and ... (by sadavied)
Need and SDL user's assistance
 
this code wont work for some reason. It compiles and executes but the only thing that shows up is a black screen. I put the BMP in the same file as the exe. but...
[1 reply] : Please stop posting the same question on multiple threads. It's very ... (by cnoeval)
just general questions
 
1) How do I wrap lines? Example: cout << "Hello blah blah blah ... too long... runs on in the window.. I want to wrap it like this."<<endl<<"Continuing on b...
[4 replies] Last: Any of these work: std::cout << "Stuff on the first line ..." ... (by jsmith)
string::find ?
 
// string::find #include <iostream> #include <string> using namespace std; int main () { string str ("There are two needles in this haystack with need...
[1 reply] : yes. (by jsmith)
a question on loop efficiency
 
i was wondering int determinant(int n){ for(;n>0;n--){ D*=A[n-1][n-1]; } D/=ms; return 0; } or int determ...
[13 replies] Last: That's the command that added the whitespace to the code above. (by moorecm)
by rekson
No newline at end of file
 
I just wrote a simple program that reads from a file and displays one of the numbers in it here: #include <iostream> #include <fstream> #include <iomanip>...
[1 reply] : Some text editors append a newline to files which end with something t... (by Bazzy)
by vRltwE
Problem with GNU Scientific Library Example
 
Hi, I am using exact the code showed in "2.1 An Example Program" from "http://www.gnu.org/software/gsl/manual/html_node/An-Example-Program.html" #...
[2 replies] Last: Did you tell the compiler/linker that you want to link to that library... (by Bazzy)
What am I not doing right? I won't build!!!
 
//Header file #include <iostream> #include <string> using namespace std; using std::string; class Employee { public: Employee ( string, string, ...
[3 replies] Last: Here's something that compiles. Compare it with the corresponding line... (by Moschops)
by chess
C++ function
 
Hi I would like to know why we do not define function parameter inside the function itself and why we are allowed to used them?
[1 reply] : Function parameters are information passed into the function. int ... (by some random dude)
by notme
reading from a file to an array, then printing it out
 
i need help with a problem im having, im trying to read in some things from a .txt file and put them in an array, then print out the information, i just cannot ...
[3 replies] Last: char word ; while(file >> word){ //now word is A, K, Q, J or T ... (by hamsterman)
Reading a file and then printing
 
Hi! I am writting a program that needs to be able to open up a .txt file check its content go through the lines and pick out certain lines for example: 12...
[no replies]
Graphics library
 
What do you guys think would be a good graphics library to start out with for game programming?
[14 replies] Last: what about hge? http://hge.relishgames.com/ does anybody use it? (by KillerkoUK)
Collisions troubles, sprite vs tile map
 
hiya I have some troubles with collisions in my simple 2d platformer (in HGE) thats driving me crazy i have a simple 2d array tile map drawn on the scre...
[no replies]
by firix
Binary_tree pointer and references
 
hello friends, I'm trying to write an implemenation of an unbalanced binary search tree.I have most of the basic functions working like create tree, attach n...
[1 reply] : Bnode *Btree::maxNode(Bnode *pnode)const { Bnode *pivot = pnode;... (by ne555)
Home work troubles, Memory exception
 
I am in a distributed education programming class, our most recent assignment has me stumped with a error that is driving me insane. The IDE I have on my person...
[4 replies] Last: aw ok, thank you that got it working! (by Casper3912)
SFML troubles
 
i decided to start learning SFML and i looked up the instructions on how to install it to VC++ 2010. I did everything perfectly. Now here's the problem.... I...
[15 replies] Last: If you are running it from the IDE, try going directly to the .exe and... (by Danny Toledo)
by acorn
about list
 
how can i declare a object of list. a object of my own. and be able to insert and remove at any position by using an index. I tried to add to the list using an ...
[1 reply] : The first parameter needs to be a list<myobject>::iterator, not an ind... (by Zhuge)
by zr870
Compiler Error "non-lvalue in assignment"
 
when i compile this code i get "error: non-lvalue in assignment" why? Just so you know, this program soves for the missing parts of a triangle, los and loc are ...
[1 reply] : void missang() //Finds the missing angle if only 2 are entered { ... (by Danny Toledo)
by tian
Accessing values from a different function
 
Say i have 2 function, a and main. Function main wants to access a value used internally in function a without returning the value. Is there some simple way to ...
[3 replies] Last: thanks, pass by reference did the trick. I knew it had to be someth... (by tian)
SDL troubles
 
i decided to start learning SFML and i looked up the instructions on how to install it to VC++ 2010. I did everything perfectly. Now here's the problem.... I...
[no replies]
February 2011 Pages: 1... 2021222324... 43
  Archived months: [jan2011] [mar2011]

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