General C++ Programming - January 2013 (Page 31)

Algorithm: How do i solve this in a faster and more accurate way?
 
Here is the question: Ramu was a lazy farmer. He had inherited a fairly large farm and a nice house from his father. Ramu leased out the farm land to others an...
[4 replies] Last: Even i got it accepted, i was stuck on this problem for so long, than... (by meteora)
set vector step length when resize?
 
Hi everyone, When I use vectory.push_back(obj), if the length is out of reserved bound, it will deallocate the whole vector and reallocate a big piece of mem...
[6 replies] Last: > push_back does increase the capacity 2x when there's not enough spac... (by JLBorges)
if else statement
 
I'm trying to make a calculator using if else but it's not working fine. If i remove char 1,2,3,4 the code compiles and runs but after giving 2 values and when ...
[2 replies] Last: Also, please always use code tags - select yourr code then press th... (by TheIdeasMan)
Working with classes and Constructors
 
Hello Fellas I was working with a C++ programming book and I've been working through the chapters and i came across an assignment i decided to tackle. For some...
[5 replies] Last: Also, nothing to do with your question or anything.. but isn't switch ... (by MrProxx)
by adz
Labolatory Work Problem(Calculation with use of conditional loop statements))
 
Greedings!Guys, i have problem with undestanding, where is my mistake on my project. I have done this labolatory task by using method of recurrent factor and wh...
[no replies]
Basics for card game
 
*MAIN* /* ************************************ * @Author: Shah Nami * @Created: 11 december 2012 * @Title: main.cpp ***********************************...
[1 reply] : *Makefile* all: O9O1 O9O1: O9O1.o main.o g++ O9O1.o main.o -o O9O1... (by MrProxx)
Urgent: Dynamic initialization
 
Hello everyone, I hope you could help me with this problem. I created a class (let call it X) which contains the structure to store the data from my data bas...
[3 replies] Last: Thanks for the information, I really appreciate it. Yes, that's exac... (by holyjocker)
Horse race
 
*HEADER HORSE* /** * Header file for Horse-class * * @author Nami Shah * @date 2012/01/23 */ #ifndef INC_HORSE_H #define INC_HORSE_H #inclu...
[2 replies] Last: Correct. *Makefile* all: race race: Horse.o Player.o main.o g++ ... (by MrProxx)
Base class design
 
Hi everyone, As I'm still quite new to C++, I'm still unsure at times about what the best practice is to implement things. My current project is writing a...
[9 replies] Last: Thank you very very much JLBorges for that, having your input was inva... (by closed account o3hC5Di1)
wxSmith and Code::Blocks
 
I am working through a tutorial using code::blocks and wxSmith. the program will build, but will not run. It opens a window to send an error report to Microso...
[no replies]
Limited The Code <?>
 
#include<iostream.h> #include<iomanip.h> void main() { int i,j,smalltest,temp; int Array ; cout<<"Put A Value !"<<endl; for (int a=0; a<=7; a++) {...
[3 replies] Last: @NwN please put in one @code so all done,this is my assignment for 1 ... (by MikeyBoy)
by jaded7
Some inheritance, ctor, dtor questions
 
Suppose I have two classes, as such. class base; class der : public base; None are ADTs. Say I then construct an object... base baseObject; Is it p...
[4 replies] Last: > Is it possible to, at a later point, create an object of der, withou... (by JLBorges)
Open MP
 
I have not so much experience with Open MP. I just want to ask if my idea is good or not. What I have to do is to make parallel a string matching algorithm whe...
[2 replies] Last: Stewbond, thank you for the answer! My idea: I have already written a ... (by Defaul666)
How to libcurl and Qt Creator (MinGW)
 
So I had a hard time finding something on Google on this. And my searches turn up allot of people having the same issue. So I just wanted to share a fast a...
[no replies]
std::isalpha() bug in MinGW 4.7.2?
 
I'm using Nuwen's distribution, found here: http://nuwen.net/mingw.html Can someone confirm this to be a bug? Thanks. #include <cctype> #include <iostr...
[5 replies] Last: You should not check from the very lower value of a char. As the asser... (by S G H)
Best Way to Optimize rendering
 
What is the best way to optimize a voxel engine? Only render what the player can see from his viewpoint? or Find faces that are the same and render them as...
[2 replies] Last: Ok, that's what I was looking for. I figured it would be sluggish to h... (by Pickle Gunner)
How do you fill a value of a dynamic array of dynamic arrays?
 
I'm writing a program in which I have to use a matrix to represent a file in code. because it's a file, the size of the matrix is undefined, and therefore the ...
[2 replies] Last: Aaah! I didn't try that one! Thanks man! It actually really makes sens... (by Niels Meijer)
IDE with best auto-completion & features?
 
I'm debating switching over from Codeblocks and to Codelite or Eclipse CDT. Should I get CDT or Codelite. I want to be able to easily integrate libraries and ha...
[5 replies] Last: Check out microsoft Dreamspark. If you're a student, it is I was re... (by aquaz)
Fastest performance lookup/insert/update thread safe
 
I've got a name and a score. Name is a std::string, score is a double. I need to be able to, in a thread safe way update/read name/value pairs from multiple t...
[5 replies] Last: If you're already using critical sections then you're unlikely to get ... (by iMalc)
Compile to run on computer without windows
 
Let's say I want to write a hello world program that runs on a machine without a operacional system. What I have to know about? I don't expect you guys to teac...
[3 replies] Last: Let's say I want to write a hello world program that runs on a machin... (by Cubbi)
January 2013 Pages: 1... 2930313233... 36
  Archived months: [dec2012] [feb2013]

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