General C++ Programming - August 2014 (Page 2)

sorting vector of strings alphabetically
 
Hi, I'm trying to write a program that reads in from a .txt file the movie title, rating, director, actors etc. All I want to do is to just sort movie titles al...
[2 replies] Last: Just a guess: std::sort(movies.begin(), movies.end(), (Movie const ... (by LB)
Trying to store information from a file in a linked list
 
I'm trying to open a file (contains member information) and store the information in an object, which is then inserted into a linked list. However, the current...
[7 replies] Last: line 20 of the fourth file, struct ListNode *next; should be ListNo... (by Yay295)
by Illuk
String to Character
 
I have a text file which contains ASCII of A,B and C like below, 65 66 67 Now I need to create a file which containing letters related with above ASCII lik...
[2 replies] Last: Thank you very much. You solved my problem... :) (by Illuk)
hard to find file r/w bug
 
Hello. I do not know why my file stream is reading only one record from the file. Here is the file and function to read/write. 4 J13013709 Mohammad M Rahma...
[5 replies] Last: btw thanks all..it working now... but fstream do not read and write..j... (by csstudent123)
by mIXpRo
Abstract Function Object
 
How to use an abstract function object ? I mean i want to define a class that only implements operator () , like this : class IndexCalculator{ p...
[2 replies] Last: http://www.eelis.net/iso-c++/testcase.xhtml A testcase consisting of r... (by ne555)
Pointers to classes question
 
First: I don't understand Example4() : ptr(new string) {} Example4 (const string& str) : ptr(new string(str)) {} I will write it is another way fo...
[3 replies] Last: Thank you for the answer Could you check also this topic for an answe... (by helshahaby)
Pythagorean Triples
 
Okay, I'm hunting down Pythagorean triples. Both the natural ones, and the multiples. What I would like, is to read in a value n, and then output every py...
[2 replies] Last: Your program finds all triples. The lists are just sorted differently. (by helios)
Error In passing a random number generator
 
Hi! I was running some Monte carlo simulations and I was having some trouble passing my Normal-Random-Generating object as a parameter to the simulator. I crea...
[6 replies] Last: What you did: http://coliru.stacked-crooked.com/a/088a05b856aa74ee Wha... (by LB)
I need quick answer for this
 
When & is used in this way SimpleMonetCarlo(const PayOff& thePayOff) what does it mean. Also like this Numeric CND(const Numeric& d)
[8 replies] Last: thanks once again (by C wonder)
Vector of Template in Template
 
Given: #include <string> template <class T> class basic_container{ private: string name; T val; public: void set_name(string); void set_val(T); ...
[1 reply] : is this possible Yes. (by kbw)
OOP Question
 
Hello, Suppose I have two classes: class Date { public: // Constructor goes here int Day; int Month; int Year; // additional members }...
[2 replies] Last: @Computergeek01: I would use a multimap, not a map, in this case ;) (by LB)
by it058
simplest struct code
 
#include<iostream.h> #include<conio.h> struct node{ char info; node * next; } ; node *abc=new node; abc->info='k'; void main() { clrscr();...
[8 replies] Last: Are you on Windows? http://www.microsoft.com/en-us/download/details.as... (by LB)
Templated Templates?
 
Hi, I'm wanting to write some templates that use templates. I can do this by leaving a complex object as a generic type, but what if I want to ensure that some...
[2 replies] Last: #include <iostream> #include <string> #include <set> #include <unorde... (by JLBorges)
Good performance in linux horrible performance in windows!
 
hi, in linux the app is so smooth i move the window around without any concern ! the cubes load without prob(will explain what my app is) on windows its so s...
[8 replies] Last: Something else to consider along with keskiverto 's train of thought ... (by Computergeek01)
Why does the result differ?
 
My code doesn't seem coincident whenever I run it. More specifically, when I enter like <qwer,qwer,qwer,qwer,qwer>, then it works. However, it doesn't work f...
[7 replies] Last: //code777 Ah, I understood now. The problem is the memory. It was s... (by inmybrain)
How to make a loop
 
How to make a loop so program never end, it end only by typing "EXIT"
[1 reply] : 1) Make a loop based on a condition that can never be false. The sim... (by MikeyBoy)
C++ HELP
 
This is my Script and I do not know what Is wrong with it please rewrite the script correctly #include <iostream> using namespace std; int main() { ...
[9 replies] Last: Yeah that would work but comparing two arrays wouldn't like that http:... (by giblit)
by Iona
Modifying for loop to make it faster
 
Hello, I have this code which performs the analysis part of discrete wavelet transform. It works pretty well. However, I wish to reduce the time that it cons...
[5 replies] Last: As I alluded to earlier temp_row doesn't seem to need to be a vector, ... (by jlb)
Odd Looking declarations: char a??(3??)
 
Any idea what this syntax is? Porting some CPP code from VS2005 - will not compile in VS2010 Thought at first it was corrupted files - but files appear to be ...
[4 replies] Last: Digraphs and trigraphs are planned to be removed (or disabled by defau... (by LB)
by Illuk
GetAsyncKeyState(i) == -32767 meaning ?
 
I want to know meant by GetAsyncKeyState(i)==-32767. This is a part of a simple key logger code. for(i = 8; i <= 190; i++) { if (GetAsyncKey...
[4 replies] Last: Thnx 4 Dish & AbstractionAnion. Actually I want to detect key pressed.... (by Illuk)
August 2014 Pages: 1234... 25
  Archived months: [jul2014] [sep2014]

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