General C++ Programming - May 2012 (Page 39)

Are there hashes in C++, or something similar?
 
Hi, I'm practicing with arrays and I was wondering if there is something that in Ruby is called a hash, where you can basically add the name and the value to...
[6 replies] Last: This might be what you're after: http://cplusplus.com/reference/stl/ma... (by Galik)
C++ startup methods
 
Well guys I've given a laptop to some elderly people for free "there poor",and I wrote an app that gets the microsoft updates automaticly for them,there was an ...
[6 replies] Last: Hey I fixed my issue,msdn and google,I wrote out my own code to test i... (by GodSpeed)
Hangman String Comparison Problems
 
I'm having a problem where if I try to compare a user's guess (string "userEnteredWord" which was then assigned to a corresponding array location in string "al...
[no replies]
Background Color In Console Help
 
Hey all. I am just finishing up a program to play Tic-Tac-Toe, and everything is working fine except for a couple of small issues. 1. I need only the Xs on t...
[3 replies] Last: Here it is, the only thing i havnt finished is finding a winner. I pla... (by Need4Sleep)
compilation issue with boost1.46
 
Hi , I need urgent help . I am trying to compile my code with boost1.46 but I am getting following error - scalable.cpp: In member function 'std::string SB...
[no replies]
Overloading new operator with args
 
I'm having trouble overoading the new operator when user arguments are present. Here's the declaration of my overloaded operators: class DA { public: ...
[1 reply] : new DA (input_cols) calls the single-argument operator new and uses ... (by Cubbi)
by viliml
c++11 compiler compatible with dev-c++
 
I am currently working with dev-c++, and I realy dont want to switch to some other IDE, but I do want to use c++11, which the built-in compiler in dev-c++ does ...
[10 replies] Last: OK, tnaks I've maneged to do it by deinstalling the whole previous de-... (by viliml)
by Noha
pointers, calloc
 
Hi guys, I wrote this function: #include <stdio.h> #include <stdlib.h> #include <string.h> #include "pension.h" // basic struct for the 3 types st...
[6 replies] Last: Thanks :-) (by Noha)
& org
 
(const String& org, const String& app) Can someone tell me what org. stands for in the previous argument, and if its not asking too much, what is the purpose of...
[2 replies] Last: And the type of org is const string& in this case, which reads "refe... (by hanst99)
ListBox consume memory
 
Hi! I have to append text in ListBox in loop but, consume much memory. How I can to do to append text without consume memory? Thanks, Tchelo
[1 reply] : If this is Windows, try creating a no-data listbox (http://msdn.micros... (by webJose)
by JJJSSS
How can I compute an integral using C++?
 
//HERE'S WHAT I HAVE SO FAR. //I DON'T KNOW HOW TO FINISH UP THE QUADRATURE FUNCTION. using namespace std; #include <iostream> #include <cmath> ...
[9 replies] Last: Nope, not everything that uses higher order functions is automatically... (by hanst99)
Describe output of the following program
 
can anyone describe the output of the following program, and explain why it is produced. ?? thanks struct base { virtual void foo(void) { count << "base" ...
[3 replies] Last: If the person preparing the final exam cannot spell cout and mistake... (by Moschops)
virtual function
 
Hi, sorry if this isn't in the right forum. Anyways, I have a simple question about virtual functions. When you have a base class that contains a virtual m...
[2 replies] Last: When you declare a virtual function in a class the compiler creates a ... (by clanmjc)
Tool to analyze c++ source code
 
Hi, I have got some c++ source code , I need to understand that code . like function calls sequence and class hierarchy etc . Is there any analysis tool...
[no replies]
Return a value
 
how would I modify this code to return an integer value to main to compare if player one's card number is greater than player two's. int playerone(Card * ...
[2 replies] Last: When run the program spits out a random card for player one and player... (by mikebell)
Hamming
 
Can anyone please convert this piece of code to c++, It is written in python. def hamming_distance(s1, s2): assert len(s1) == len(s2) return...
[2 replies] Last: For counting bits, std::bitset<>::count is both simpler and faster (... (by Cubbi)
I'm having a lot of problems with this code;
 
"Assume the tanker is a cylinder with length 43 feet and capacity 9500 gallons. In feet, what is the diameter? " I'm very new at this and I don't even know h...
[3 replies] Last: you first divide the no. of gallons with 6.288 to get cubic feet, and ... (by viliml)
Operator = overloading
 
let's say I have this: struct coor { int x; int y; COORD operator=(coor c) { COORD C={c.x,c.y} return C; } } and I needed to do: coor c={0,0}; COORD C=c;...
[12 replies] Last: Of course, but as I said, that's a convention. (by hanst99)
Problem with 9999999999999999999 as a long double or long int
 
Hi I have a problem trying to add 9999999999999999999 and -1 for example. My result is -8446744073709551618 The program is: #include <stdio.h> #i...
[2 replies] Last: Thank you very much. Finally had to use a long double and print it wit... (by lestatgirl666)
by mx760
pointers and array!!
 
Hi, why can i dynamically allocate memory for integer array, but not string. I mean, when i compile it outputs both: 9909 and "what's up" but crashes if i inclu...
[4 replies] Last: I wouldn't call that playing it safe. Your use of holder could very ... (by Telion)
May 2012 Pages: 1... 3738394041
  Archived months: [apr2012] [jun2012]

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