General C++ Programming - November 2012 (Page 37)

Need help for algorithm in combination problem (1,2)
 
Here's the complete problem [ http://www.iarcs.org.in/inoi/contests/apr2006/Advanced-1.php ] Problem is that i don't have any idea how would i calculate numbe...
[30 replies] Last: @icegood: good job. The concepts are the same, but you changed the for... (by ne555)
zero divide
 
Can i assume that this have proper behavior: const int NUM = 5; for(int i = 0; i < NUM; ++i) { float data = (float)i / (float)NUM; } or should i check ...
[3 replies] Last: Thank you both. (by morando)
Largest Number Performance
 
Ok, so I came across the problem (yes, it was class work but I have finished it and moved on 19 / 20 on it) and it required finding the largest number of 5 numb...
[2 replies] Last: Cool, I never thought of this. With my solution if tow or more are tie... (by Pickle Gunner)
by tap
Default parameters and recompiling
 
Hello I just had a discussion with a colleague at work who is responsible for the building of our rather large software product. To reduce file size, time us...
[3 replies] Last: Nuts. Cut n' paste error! Sorry. The first time I fed it the x value; ... (by Moschops)
C code to C++
 
Can someone help me translate this code of C to C== code like using "cout<<" Kinda help me in this small problem of translating this code :D thanks #inc...
[1 reply] : For example it could look the following way (without testing) #inclu... (by vlad from moscow)
need help!
 
hi evry1. i need to compile a prog which generates even numbers from 1 tp 20 without using conditional statements(if, else if)...just using for loop. thnx
[1 reply] : for ( int i = 2; i <= 20; i += 2 ) std::cout << i << ' '; (by vlad from moscow)
by Kastis
What's wrong with this code ?
 
My code compiles with few warnings about deprecated conversion from string constant to char, but program not working. here is the code : #include "laikas.hpp"...
[2 replies] Last: Please post your compiler output //Klases kintamuju reiksmiu ive... (by TheIdeasMan)
sequantial search algorthim problem
 
hi , hello every one I have encountered this problem and this is what made ​​me to come here It just makes me confused I do not know why I get this error e...
[1 reply] : Parameter 1 should be 'list', not 'arr'. 'Arr' is not an array, it's o... (by Imadatobanisa)
Whats wrong with Match !!??
 
here is my header file of Match.h #ifndef __MATCH_H_ #define __MATCH_H_ #ifndef __STD_INCLUDE_ #define __STD_INCLUDE_ #include <iostream> #include <string> #i...
[1 reply] : You included "league_heder.h" before "match_heder.h" in "match_heder.h... (by vlad from moscow)
using vectors in C file
 
Hi all I am trying to get the vector's functionality in C ! . But i am getting below error (compiling with g++). I am not able to locate where i am going wr...
[4 replies] Last: I got it ... I was copying the same buffer everytime .. "wallinfo " ... (by bikram07)
Trying to analyze the bible
 
So I'm trying to make a program that will analyze a text document and output the most frequent words. I'm using visualstudio 2011. The file paths are correct, I...
[2 replies] Last: I believe you are dereferencing a pointer before allocating memory if... (by naraku9333)
by Ikaros
[Solved] Problems with virtual classes
 
I have to solve a problem where I need to evaluate a function. Let's called it g(y). This g(y) depends on functions f(y) and h(f(y)). (f and h are known)Have tr...
[7 replies] Last: I solved the problem. Thanks for everybody. (by Ikaros)
Easy way to get frequency of letters
 
Hey, Suppose that I was to write a function to get the frequency of a letter in a string. Is there an easier way to do they other then having a monster of a sw...
[7 replies] Last: What does freqHelp return that you're trying to assign to freqcount ? ... (by cire)
explicit instantiation vs std::vector template how: gotcha
 
Just continuation of closed theme http://cplusplus.com/forum/general/83798/ Now have a kind of library with <algorithms> involved. Crashes again. main file ex....
[2 replies] Last: anyone has same? Don't know - not tried it yet. (by guestgulkan)
header files and classes.
 
Having a hard time with the syntax. I have a complex problem, but basically I cant get the syntax right. I keep getting the following errors, pa8.cpp:11:23:...
[1 reply] : pa8.cpp:11:23: error: no matching function for call to ‘Coordinate:... (by TheIdeasMan)
PLAYFAIR MATRIX RETREIVING
 
hello everyone, i am making a programme on the playfair matrix in which both cipher text and plain text is given to me and im ought to retrieve the KEYWORD. i m...
[no replies]
Converting from Fahrenheit to celsius.
 
This is what I have so far... #include <iostream> #include <iomanip> using namespace std; void programOverview (); char getScale (); double getDegree ...
[1 reply] : #include <iostream> #include <iomanip> using namespace std; void pro... (by Episteme)
Allocating Memory To A Pointer Of An Object Created From A Class Of Array
 
I am so new in C++ programming. I am trying to write a code for a chess engine.. here is my class declaration: //for the board class struct boardTemp { p...
[10 replies] Last: @cire >> that was my mistake. I was confused with the array , I thoug... (by jrfrago)
Template Classes program example won't compile
 
Hello everybody; I was doing a little program that I found in a programming book, just to practice a little, but I don't understand why it won't compile in my M...
[3 replies] Last: Oh, hahaha! Thanks man, very appreciated =) (by oldcrow)
sometimes not #include <XX>also work
 
look, I didn't #include <ios>, and this program also works, and produces answer. #include <iostream> int main() { double pi = 3.141592653589792; st...
[14 replies] Last: Awesome - thanks Cubbi :+D There is a lot of great stuff in boost - I... (by TheIdeasMan)
November 2012 Pages: 1... 3536373839... 51
  Archived months: [oct2012] [dec2012]

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