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

graphics
 
hi all dears,,......i am using graphics first time ....in c++.. can any one help me how to draw flowers in boundries of the page ...like to draw circle we use ...
[1 reply] : what library are you using? (by hamsterman)
Shortest Path
 
How can we use Dijkstra's or Bellman–Ford's algorithm to find shortest path in a graph whose some of edges are affected if we go specific vertices. Such that,...
[3 replies] Last: I think no one knows a solution? (by akayrak)
IBM's International Programing Contest Final Question!!!
 
The 1998 22nd Annual acm International Collegiate Programming Contest World Finals sponsored by IBM Problem F Polygon Intersections Input: poly...
[1 reply] : Here's how I see it: Let's name the polygons A and B. First step... (by hamsterman)
by erga
a problem with sin calculation.
 
#include <iostream.h> #include <math.h> #include <conio.h> #include <fstream.h> #include <iomanip.h> #include <stdlib.h> int main() { const floa...
[1 reply] : well, i bypassed it and it appears there is nothing wrong with calcula... (by erga)
by JoR
List/Tree for access by identifier string.
 
Hi Guys. I'm looking for a data structure to store instances of a specific class in, that should then be easily accessible through a public string attribute ...
[2 replies] Last: Thanks, exactly what I were looking for. :) (by JoR)
Finding Odd Numbers
 
I am trying to write a short and concise C++ program to find the following: 6 non repeating odd numbers who's sum equals 60. The smallest odd number equals to...
[2 replies] Last: @naratu9333 we can eleminate one of the if checks #include<iostrea... (by soumyaxyz)
string
 
#include<iostream.h> void main() { char *str ={"lovely","hakeem"}; cout<<sizeof(str); } its size is 8 ;can any one tell me how????? tnx ...
[11 replies] Last: ok...tnx to all........good help..i will avoid that mistakes again....... (by lovelyhakeem)
by Jarec
Expansion of two-dimensional array
 
Hi, this is my first topic in this site. So I'm going to go directly to the problem with reallocating two dimensional array with realloc, because I want to exp...
[8 replies] Last: The compiler was not the problem. I am using GCC myself. The code I po... (by rocketboy9000)
by Manmay
number series program (1,2)
 
since a beginner please help me with the solutions to : WAP to print 1) 1 1 1 1 1 1 1 1 1 1 2) 1 2 3 4 5 6 7 8 9 10
[26 replies] Last: I apologize for my behavior , but finally am able to solved my own do... (by Manmay)
strings
 
#include<iostream.h> void main() { char *str ={"lovely","hakeem"}; cout<<sizeof(str); } its size is 8;can any one tell me how????? is str is pointer h...
[2 replies] Last: Since you're using C++ just use std::string. It's very awesome. (by Kiana)
Float miscalculations
 
I'm trying to write an OpenGL program to demonstrate simple physics but I'm experiencing float miscalculations. According to the Visual Studio debugger, when...
[10 replies] Last: I'm not sure if it will solve your problem, but try to replace float w... (by Jarec)
print prompt
 
int main() { string ex; while(true) { cout<<'>';//print prompt cin>>ex; if((! ex.compare("quit")) || (! ex.compare...
[2 replies] Last: I have made it done. Thank you! (by timothyguo)
error C2666: '==' : 2 overloads have similar conversions
 
I have an overloaded comparison (==) operator which works fine until I add an overloading of char* operator. It gives following error then: ----------------...
[5 replies] Last: Wow !! It was such a clear explanation.. Thanks to both jimc and Hamst... (by manintiet)
error
 
Guys, can u plz help me out. Why is following error coming twice in the folowing program? error C2679: binary '=' : no operator defined which takes a rig...
[2 replies] Last: Hey Thanks Gloucestor !! I have understood. (by manintiet)
A switch repeating itself to default in a loop
 
So basically, i'm writing a small game in c++. What you see is the skill point distribution function. This is just a small solution I created to try and isolat...
[3 replies] Last: Okay well, I don't know if any of you have solved the problem, but I h... (by rambleberry)
Default Size of Integral Literal Constant
 
void foo(void* arg) { } int main(int argc, char** argv) { foo((void*)1); return 0; } Is there any standard that compilers are to meet that d...
[6 replies] Last: If it is a void*, you have to simply know the original type and cast i... (by Zhuge)
the vectors seem to run very slow
 
how can i run in release mode in visual studio??
[6 replies] Last: For arrays, you have to know some dimensions at compile time. I haven... (by jimc)
Hash algorithm with integer data
 
Hi, I am working on a project where I need to use hash algorithm. We have decided to use "AP hash algorithm" as at "http://www.partow.net/programming/hashfuncti...
[1 reply] : pass it in a more compact base, like maybe 64. That will probably comp... (by rocketboy9000)
Trying to make a hangman/language translation game but failing.
 
Im creating a language translation program and have really confused myself. I have two strings, one English and one another language and by using a switch/case ...
[1 reply] : go through the strings and store each word separately in a vector. th... (by rocketboy9000)
Keeping old data in a multidimensional array
 
Something like 6 months ago I made a class that encapsulated an array of any number of dimensions using cstdarg, but I never finished it because I couldn't figu...
[3 replies] Last: Blaargh, just realized that my solution wouldn't work... (by PiMaster)
December 2010 Pages: 123456... 24
  Archived months: [nov2010] [jan2011]

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