General C++ Programming - October 2013 (Page 16)

SFML 2.0 Pixel Perfect Collision
 
I have the code and it compiles fine but it doesn't work. (i am using the coding made easy sfml 2.0 tutorials) Code: #include <SFML/Graphics.hpp> #include <...
[18 replies] Last: yeah i think i am going to try distance based (by Cronnoc)
Set array size at compile time thru constructor
 
Hello, How do I set the size of a member array via the class constructor if I know the size at compile time. I can do this with templates, see below, but thi...
[15 replies] Last: I should have said, since it's a template function whose result depend... (by Cubbi)
need help with text box
 
i am writing an app in sfml 1.6 and i cant figure out how to make a text box. can anyone help?
[2 replies] Last: thanks ill take a look. are they easier to use/install than qt? im wri... (by closed account Dy7SLyTq)
C++11 Member aliases
 
Hi ! In first, sorry for my english. I've got a problem with member type definitions. Here is the situation : class A; // What am I supposed to writ...
[4 replies] Last: In your code I do not see a Bar member variable. (by LB)
I Have A project need to load bitmaps in borland c++ 4.5 wijndows 8 x86
 
my code is //3.1 Average of Three Numbers #include<iostream.h> #include<conio.h> void main() { int m1,m2,m3; float avg; char ans; cout<<"Ent...
[no replies]
time limit exceeded problem help??
 
final
[1 reply] : If you could provide an example input use meaningful names and inden... (by ne555)
HELP WITH INPUT/OUTPUT FILE STREAMING
 
I'm trying to write a program that will read from a file a list of incomes for persons employed ( I have the input file already made ) and also read the data t...
[no replies]
by Snaksa
Include libcurl
 
Hello! I downloaded the zip file from the official site of libcurl. Can you tell me where shoud I place the folder or the files?
[1 reply] : did you read this? http://curl.haxx.se/docs/install.html (by mariostg)
Prime Factors of a Number
 
I have to create a program where I need to find the prime factors of a number and express it using exponents. For example, for the number 1368 should output:...
[3 replies] Last: bool isPrime (int n) { if (n < 2){ return false; } for (int i=... (by hockeynl)
Text
 
Hi every1! I want to know more about formatting text in Borland Turbo C++. I want to understand everything from text colour to bold, italics, etc similar format...
[1 reply] : there are many ways to do this. assuming your just talking about the c... (by closed account Dy7SLyTq)
Request for member when I call function
 
I'm writing a small c++ program which will be able to do a few things with a matrix. I have a class called Matrix and a member function in it called getSor() wh...
[1 reply] : From that error message, it looks like you've defined matrix as a po... (by MikeyBoy)
Please Help: std::length_error
 
Working on a project for class using separate compilation. I have a Student class and a Roster class that holds an array of Students. When I try compiling a t...
[2 replies] Last: Thanks, I actually spotted that finally myself, a few minutes before s... (by David Reghay)
by mrkcc
Save class
 
not found save string. #include <iostream> #include <fstream> using namespace std; class person{ int id; string name; public: void setId(int...
[1 reply] : not found save string Care to elaborate? edit: you need #include ... (by mutexe)
Load HTML code
 
I want to: 1. Load HTML File (or take stuff from string) 2. display window with content of that html so yeah, basically something like a browser, is ther...
[1 reply] : Hi there, I believe WebKit does just that: http://en.wikipedia.org/wi... (by closed account o3hC5Di1)
How to copy anything on already written console/command prompt?
 
Hello, i want to know how to copy data from already written text on console? i am actually making a program that reads texts already printed over console s...
[2 replies] Last: Douas thank you! worked for me! (by Ahmad1797)
What is wrong with my Code?
 
I am trying to get Linear Regression #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { double x = { ...
[2 replies] Last: found your example (nearly) http://www.codecogs.com/library/maths/app... (by fluppe)
Code Block: Error
 
I am using Code Blocks version 12.11, when i run any code in code blocks IDE it shows the following message, so please help what is wrong my code blocks --...
[8 replies] Last: ... maybe it would make sense to look what the "physical" output of th... (by fluppe)
by Vigii
value of an array is not copied to other array
 
Hi All, I'm trying to copy one element value in an array to other array( Line no: 19 ) in the following program. There is some problem due to which it is disp...
[2 replies] Last: No way this will run, so what is g and what is h ?? I guess these are ... (by fluppe)
Returning multiple variables in 1 function to main()
 
I am trying to return 2 numbers from my function to main(). They are both read in from an input file but it is not working out. #include <fstream> #include...
[4 replies] Last: Returning multiple values are what tuples are for: #include <fstrea... (by Duthomhas)
by kaiken
stuck on input file
 
okay im making a math game program that simple and need to have a user input a name and then that name.txt is brought up and use variables from the text to add ...
[10 replies] Last: i figured it out. i had a few things wrong in my code. (by kaiken)
October 2013 Pages: 1... 1415161718... 46
  Archived months: [sep2013] [nov2013]

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