General C++ Programming - June 2012

in_avail() not working for me.
I am using windows. I copied this program from Reference section in this site, as it is.When I run t...
[2 replies] Last: Thanks so much Cubbi. I added the line cin.sync_with_stdio(false); a... (by johnwestman)
see if Esc key is pressed while awaiting input from user
I have a function that currently waits for input from the user and stores it into a long unsigned in...
[2 replies] Last: That won't work if he's waiting in an iostream command (ie cin >> var... (by Disch)
Compiling code on Windows Phone
I know it sounds very sickening, but is there any compiler that I can download to use on Windows 7 p...
[no replies]
by P4r10
Need some help wit POP!
Hi guys, I'm working at a project, it's finished, but to improve it just that bit more i want it to...
[no replies]
Trivial use of polymorphism?
I am working on a shooter game in which several types of shot motions will be used. It seems like a ...
[4 replies] Last: Me neither, xP. Suppose that you want other objects to move too. That ... (by ne555)
multi threading
hi all i want to do part of project with multi threading in c++ but dont know ,how pass multi argu...
[6 replies] Last: unsigned id; HANDLE hThread = (HANDLE)_beginthreadex(0, 0, ThreadFunc... (by kbw)
Remove characters from string
I want to remove the initial and final " character from my string: string str("\"aaaa\""); // "aa...
[3 replies] Last: @GliderKite You are wrong. Your task as you described it is to delete... (by vlad from moscow)
algorithm order
Hello sorry.Can you help me determine the order of the alggorithm T(n) = T(n-1) + (n-1)/n(n + 1...
[6 replies] Last: You could solve the recurrence, and get the result in constant time. (... (by ne555)
Detecting pressed keys
Hi, I'm working on a small labyrinth game (you got a hero, you move around and kill monsters) and I ...
[4 replies] Last: If you want to do it with out pressing enter, you could use GetAsyncKe... (by Callum5042)
Opinions on multiple statements per line?
Just curious as to people's opinions on writing multiple statements on the same line. Some examples...
[4 replies] Last: Just curious as to people's opinions on writing multiple statements o... (by kbw)
Dev c++ "microsoft error" with arrays?
My code is succesfully compiled, but then i run the program it throws microsoft error "don't send" b...
[3 replies] Last: I am sorry but I do not understand what it is doing. (by vlad from moscow)
setw() not working for me
I'm using Dev C++ ver This is the code: #include<iostream> #include<iomanip> int m...
[3 replies] Last: Thanks so much for the input! Because that's the syntax given in the V... (by padfoots)
Using stringstream to name a variable
I am going to be working on a CUDA gpu based chess engine, and I will be using an unknown number of ...
[3 replies] Last: What i was doing was creating object based CPU threads and my focus wa... (by JakeIsBoss)
gcc 4.7 with C::B
I've been doing a little research online about the best way to get C::B running with gcc 4.7, but...
[2 replies] Last: You're right. My problem was two-fold. Firstly, I was overthinking th... (by atropos)
by revin
Project Euler #50 Hi, I'm trying to solve the problem on the above pg I'm using ...
[1 reply] : Well, this is a very messy and unoptimal code, but I won't elaborate o... (by KRAkatau)
Template Class, Multiple types in main
I need main.cpp to test the int type which is already implemented, and then double, and string. Now ...
[1 reply] : You could move that stuff into a templated test function and pass the ... (by kbw)
by NuTone
WSAEFAULT on "connect" for (network-)client
Hi guys, I'm not too familiar with network programming. In order to get more experience, I've bee...
[2 replies] Last: Thanks for pointing that out. I've been wondering what possibly could'... (by NuTone)
Template Class Help
I am attempting to convert a class to a template class, I am confused how to call from the declarati...
[7 replies] Last: Not sure why i had the virtual in there but I got rid of that. Also I ... (by rmartin20)
Class in a struct
Hi, I have two questions. 1. I know it is possible to declare class objects in structs. But is it...
[3 replies] Last: Agree with Peter87. Setting each member individually seems not so 'coo... (by iamlms)
by Scoobs
Scheduling Program
Just a little background... I started learning C++ two years ago and I stopped coding about a year a...
[1 reply] : Okay, a few things: 1) Indentation. You can of course indent however... (by rollie)
June 2012 Pages: 123... 33
  Archived months: [may2012] [jul2012]

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