General C++ Programming - December 2014 (Page 4)

Comparing two floats ranges?
 
Hello I'm trying to compare two float ranges and it seems to be a hit and miss. I'm trying to use a...
[12 replies] Last: Seems fine to me. The same logic, re-factored into functions: #inc... (by JLBorges)
do while loops
 
I haven't done to much with do while loops but i want this do while loop to end when either the play...
[2 replies] Last: thank you so much (by mercedec)
ACAII Camera
 
I am currently creating an ASCII based 2d console game as a side project. Currently it works but I ...
[1 reply] : Here is my current map draw code but it needs to be able to center on ... (by lordseanington)
3D Text Based Game
 
I know this may sound stupid, but I want to make a text based 3D game. I mean making it styled to lo...
[14 replies] Last: Thank you, it does currently work now and I thank you all. (by lordseanington)
Random array filling of airline seating assignment
 
int firstarray = { }; double firstClass(int airplane, int seats, double price) {cout<<setw(60)...
[no replies]
by Jun77
structure function
 
I'm writing a function that compares two fraction. if the fractions are equal it returns 0. If the f...
[2 replies] Last: thx alot JLBorges. now i am cleared . (by Jun77)
Why is this '\n' causing a run time error?
 
#include <iostream> #include <cstring> void replace_substring(char *, char *, char *); int...
[2 replies] Last: As Zhuge said. See for yourself: void replace_substring(char * stri... (by MiiNiPaa)
Unknown logic error, simple program
 
#include <iostream> #include <string> #include <cctype> using namespace std; const int MIN_...
[2 replies] Last: Thank you so much MiiNiPaa I see you on here helping all the time your... (by MarkyMark)
Need help with error program gives segment fault core
 
Program keeps giving me a segemntation fault error #include<iostream> #include<string> using ...
[6 replies] Last: Hi, Just a couple of minor things to add: Don't have using namespac... (by TheIdeasMan)
How can I use a string to create a class object?
 
I wanted to create a new class object and I want to name it from a string. Something like this: st...
[11 replies] Last: Something along these lines: struct info { explicit info( std::s... (by JLBorges)
cross-platform C++ compilation
 
Sorry if this belongs in the newbies forum and the moderator should feel free to move it there if ne...
[3 replies] Last: Yes. There is. Google for something like cross compilation to windows... (by MiiNiPaa)
VisualStudio is making slow programs!
 
I've wrote an algorithm for threaded IntroSort. I use winapi for threading. I've developed it usi...
[4 replies] Last: Yea, that example has very different execution times, but you used a l... (by zoran404)
General Question
 
Hello everyone! I am lately doing some "thinking" C++ problems at Euler and other sites. My question...
[4 replies] Last: Thank you very much for clarifying this to me, really thankful. Delsh (by Delshire)
Tag dispatching constructors
 
#include <iostream> #include <string> struct A { struct Tag{}; std::string name; int value; A ...
[2 replies] Last: #include <iostream> #include <string> #include <utility> struct A { ... (by JLBorges)
violating strict weak ordering std::sort
 
Getting the common segfault with this operator function (the function is really simple. It's just th...
[5 replies] Last: I'm not understanding, you consciously created a not strict weak orde... (by ne555)
Prime Number
 
/*Hi everybody This shows any prime number between a and b and also counts them*/ #include <i...
[1 reply] : "cout << "\nenter the first Number : " ;" There is a typo, pal. Assumi... (by CPlahPlahLearner)
Pixelating an image
 
Hi guys, I've been struggling with this for a few days now. My assignment is to pixelate an image b...
[1 reply] : You have to treat edges specially -- they should be 'infinite' -- when... (by Duthomhas)
minGW Segment Fault question
 
hi, using minGW 4.7.1 and getting a Segment Fault on exit from application. The fault occurs on a ...
[1 reply] : It'd help if we could see the code in question. It's unlikely that any... (by Albatross)
Sniff packets on machine connected by wi-fi
 
I've coded a packet sniffer using raw sockets and promiscuous mode and recv() function to capture pa...
[4 replies] Last: That's an interesting article, but it leaves me a bit confused. I don'... (by Clint Westwood)
by Neber
Pointer passed to function value doesn't change
 
For some reason when i pass a string pointer to a function such as string *str = new string(""); a...
[2 replies] Last: it simply doesn't change when the function exits as though it's passi... (by MikeyBoy)
December 2014 Pages: 123456... 31
  Archived months: [nov2014] [jan2015]

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