General C++ Programming - July 2012 (Page 13)

Making an array of class items
 
So I have made a text based role playing game and pretty much when the character gets to a certain coordinate on the map they receive the option to go into the ...
[3 replies] Last: It would be better that you define a stream insertion operator, to sim... (by viliml)
input string as number
 
Im dealing with very big number. so i want to use string for my number like str = '123456...' but how you input number but consider as string ? GMP is not ...
[1 reply] : It'll be easier if u change int num to char and break on '0' int ... (by soranz)
string and numbrs.
 
if I'm dealing with a very large number some one advice me use string instead long long(or other ) for example string temp ="012345"; but my program...
[7 replies] Last: I haven't looked through the UVa site, but I doubt that GMP will be ac... (by Duthomhas)
Directed Graphs
 
Any ideas on data structure to represent directed graphs which is efficient on time? This can be implemented using adjacency lists (as linked lists) but when...
[9 replies] Last: Finally its finished (kosaraju's algo for finding strongly connected c... (by writetonsharma)
Help regarding Error in declaring an array of struct
 
The first thing is, I was making this program in the school, and so I must use Turbo C++. This is how my code is (somewhat): struct X { char a ; ...
[10 replies] Last: C++ was one of the optional subjects in the school. I took it because ... (by Nisheeth)
encrypt /decrypt
 
guyzz a string and a integer or any other values can be encryped if data type is same but what bout when we have all the type of data to be encrypted
[3 replies] Last: really simple. say you have this as a string char * say="EMIN3M$$$***... (by sigmablack)
by nrozas
Problem using MySQL libraries
 
Hi all people!!! I'm new in C++ programming, and I'm working in a project to access to a database in a MySQL 5.1 server. I installed wxDev C++, then installed m...
[4 replies] Last: Possible you link with debug library and run with release. Try to ins... (by Ivan Sidarau)
by Brody
Simple Return By Reference Example
 
Shouldn't this return the same vector and the outputs be equal?? #include <iostream> #include <string> #include <stdio.h> #include <stdlib.h> #include...
[3 replies] Last: ooooh, yes just looked up return by reference again. Totally missed th... (by Brody)
Debugging ptrace
 
Hi, 2 Questions! 1. I am relatively new to coding on linux, I have a requirement to understand 'ptrace' code. Can somebody suggest how I could get the so...
[2 replies] Last: Thanks! (by DeepBlack)
by ToniAz
How smart is the Compiler with math.h
 
Hello everyone! I have hit the speed wall and it seems that floating point operations is holding the application back from early completion, though I doubt t...
[2 replies] Last: VC++ defines a pow(double,int) overload that uses a loop instead of c... (by modoran)
by ToniAz
Can't find build options in MSVC
 
Hello everyone! I want to use Code::Blocks with gcc for this one, but nooooo, MSVC is better!! I'm very frustrated, been struggling for a while now with tryin...
[9 replies] Last: You could use Microsoft compiler from Code::Blocks too (you need the l... (by modoran)
find nth palindrome number
 
Im doing find nth palindrome number project let say 12th palindrome number is 12 and 24th palindrome number is 24 int n; int count =0; while...
[12 replies] Last: actually i found all the patterns.... there is 10 or more patterns whi... (by jake eum)
Very long output partially dissapears from console?
 
Hi! I don't know how to explain this. I have a programme which prints a lot of lines (720) on the console, but when it finishes, I just can see the last 300, th...
[2 replies] Last: Thanks! That's what I needed!:D (by chrishans)
ifstream functor (C++ Primer Plus Exercise)
 
Hi So this is an exercise problem from C++ Primer Plus, I can't say I really understand the question fully but have done my best to answer it, question is as...
[8 replies] Last: GetStrs line 17: fin >> ch; should be: fin.get(ch) otherwise blank... (by blueshift)
by cgyan
splitting std string with delim
 
Hi, Curious problem here with splitting a std::string at a desired delimeter whereby the split seems to be happening at the wrong place. I am using the suggest...
[7 replies] Last: Yes, good lesson learned there. Thanks for the tip! (by cgyan)
why this is happening with pow function 10^x function
 
jegop(10,10) should not looks like that do u know why? int jegop(int a, int b){ if( b ==0) return 1; int i; int c=0; c=a; ...
[6 replies] Last: Isn't it based on the bit count? (by S G H)
Build Error, Undefined reference to [function]
 
Hi, so I have written a program to help me learn virtual methods, and I get an error every time i build it, saying: <path>\12-10_DataSlicingWhenPassingByVal...
[2 replies] Last: *facepalm thanks! (by BecauseOthersWereTaken)
by vrakas
Memory and execution time relationship
 
how does memory affect execution time? for example if i have the choice of a loop of complexity N OR creating an array arr (2 million), which one should i choos...
[2 replies] Last: The specifics of memory allocation change between operating systems, b... (by Computergeek01)
by akramm
i would game ( source )
 
I want a game of the language C + + will be run with the msdos example : a game calculates your age or Knowledge of intellectual abilities i need the game...
[1 reply] : We don't ask for free stuff like that in here. We search for it. See... (by webJose)
palindrom question
 
Im coding to guess nth palindrome number. for example 12th palindrome number is 33 I have been tried to write the code to find next palindrome number ...
[1 reply] : http://www.cplusplus.com/forum/general/75459/ (by viliml)
July 2012 Pages: 1... 1112131415... 30
  Archived months: [jun2012] [aug2012]

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