Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~14.6K People Reached
About Me

interested in c++ last year already, but just start learning this year(for the sake of helping with family's financial problem)I'm 16 btw...from Malaysia,I just hope I can learn c++ fast until my skill can be useful and everyone's help from forum is…

Interests
- Anime- Mathematics- Physic- Music; rock, heavy metal, pop, jazz, classic.- Instrument; Piano, Vocaloid(singing…
Favorite Tags
Member Avatar for Vasthor

[Click Here](http://s27.postimg.org/syqganxir/New_Bitmap_Image.png) "Having a container of pointers raises the question of how to destroy it. If you simply "do the right thing" and define a FilmList destructor that visits each of its pointers and deletes it, you must then worry about client code that contains a function with a FilmList …

Member Avatar for mike_2000_17
0
345
Member Avatar for Vasthor

[Click Here](http://s8.postimg.org/ab4paaq8l/New_Bitmap_Image.png) is adding m_y, m_m, m_d, considered as cheating? if not, how to get the value for getYMD()'s param?

Member Avatar for Vasthor
0
132
Member Avatar for Vasthor

the program is about Blob<T>, where shared_ptr<std::vector<T> > as its data members. be noted that the real problem here is about shared_ptr of my own version (simple one) but atleast (should) worked with the Blob<T>, which is the std::shared_ptr did, but not with mine. [Error Msg](http://postimg.org/image/krwflmyhx/) the error msg above …

Member Avatar for mike_2000_17
0
864
Member Avatar for Vasthor

[program error](http://s11.postimg.org/okbmkhwkj/Untitled.png) this code, which is directly copypaste from the book itself, is appended to Blob.h., producing the above error. template <class> struct std::hash; class Sales_data { friend struct std::hash<Sales_data>; // other members }; // specialization namespace std{ template <> struct hash<Sales_data> { typedef size_t result_type; typedef Sales_data argument_type; size_t …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Vasthor

#include <iostream> template <unsigned, unsigned> class Screen; template <unsigned H, unsigned W> std::ostream& operator<<(std::ostream&, const Screen<H, W>&); template <unsigned H, unsigned W> std::istream& operator>>(std::istream&, const Screen<H, W>&); template <unsigned H, unsigned W> class Screen { friend std::ostream& operator<<<H, W> (std::ostream&, const Screen<H, W>&); friend std::istream& operator>><H, W> (std::istream&, const Screen<H, …

Member Avatar for tinstaafl
0
168
Member Avatar for Vasthor

void StrVec::free() { if (elements) { for_each(elements, first_free, [this] (std::string* p) { alloc.destroy(p); }); alloc.deallocate(elements, cap - elements); } } produced this error: [Cruel Error :(](http://s3.postimg.org/4p1vfhs9f/New_Bitmap_Image.png) it was the second compiling error, if I removed the pointer, it will produced the first one. which is kind of -.-" so, I …

Member Avatar for mike_2000_17
0
156
Member Avatar for Vasthor

main.cpp // Give your class a < operator and define a vector of HasPtrs. Give that vector // some element and then sort the vector. std::vector<HasPtr> vecHP; std::string val; while (std::cin >> val) { HasPtr temp(val); vecHP.push_back(temp); } std::sort(vecHP.begin(), vecHP.end()); HasPtr.h bool operator<(const HasPtr& rhs) { return (*this->ps < *rhs.ps); …

Member Avatar for David W
0
263
Member Avatar for Vasthor

My friend and I tried to create a team of programmers for doing bunch of work, our main aim is the gaming sector (probably). It was said around the net that it was hard work. So, we decided to plan it from now. I got around 1-3 years(blurry because I'm …

Member Avatar for deceptikon
0
251
Member Avatar for Vasthor

for (std::size_t iter = 0; iter != m_queryMap.size(); ++iter) { // note here, line = iter + 1; std::set<std::size_t> lineBuck; lineBuck.insert(iter + 1); const std::vector<std::string> &bucket = m_queryMap.at(lineBuck); } where std::map<std::set<std::size_t>, std::vector<std::string> > m_queryMap; // storing each line of input // crossed with the line number as its key yup, …

Member Avatar for NathanOliver
0
206
Member Avatar for Vikram Sehgal

hello guys, i found a piece of code in the net.. this code is a progress bar loop programme. I am new to programming, and i am not able to understand this code. PLEASE can anyone explain it or tell a simpler version of it. thanks(sorry for my english) #include …

Member Avatar for Vikram Sehgal
0
200
Member Avatar for Vasthor

error: [Click Here](http://s27.postimg.org/syfgdiagz/New_Bitmap_Image.png) snippet from main.cpp: std::ifstream inFile; inFile.open ("in.txt"); TextQuery(inFile); inFile.close(); snippet from TextQuery.cpp: TextQuery::TextQuery(std::ifstream &in) { std::size_t countLine = 0; std::set<std::size_t> bucket; std::string line; while (in >> line) { m_wordStore.push_back(line); ++countLine; bucket.insert(countLine); m_queryMap[bucket] = m_wordStore; } } been trying to use std::cin to replace it as input feature …

Member Avatar for Vasthor
0
355
Member Avatar for Vasthor

http://s11.postimg.org/kxl3cemw3/error.png this is the least error that I can get from multiple time of debugging. [TheCodeFile](http://www.fast-files.com/getfile.aspx?file=70535) StrBlob.h has needed to use something from StrBlobPtr.h and StrBlobPtr.h needed to use something from StrBlob.h I did tried to #include each file on each other respectively, but ofcourse that would be a data …

Member Avatar for Vasthor
0
377
Member Avatar for Vasthor

isShorter(const string &s1, const string &s2) { return s1.size() < s2.size(); } stable_sort(ret.begin(), ret.end(), isShorter); either using stable_sort or sort the result is shown in the attachment. meanwhile: "By calling stable_sort, we can maintain alphabetical order among those elements that have the same length:" - C++ Primer 5th edi. which …

Member Avatar for deceptikon
0
192
Member Avatar for Vasthor

http://s8.postimg.org/zbfc0h92t/New_Bitmap_Image.png 'contents' can't be initialized whatever I did, thus I can't declare the type in this class class Window_mgr { public: // location ID for each screen on the window typedef std::vector<Screen>::size_type ScreenIndex; // reset the Screen at the given position to all blanks void clear(ScreenIndex); private: std::vector<Screen> screens{ Screen …

Member Avatar for tinstaafl
0
292
Member Avatar for Vasthor

The combine function been bug since yesterday. Been trying everything back then, define in the source file, remove some code to prevent overlapping definition, etc... I don't know what I should do, can anyone help on this? #ifndef SALES_DATA #define SALES_DATA #include <iostream> struct Sales_data { // new members: operations …

Member Avatar for Schol-R-LEA
0
127
Member Avatar for Vasthor

// 9-2. If we define the name function as a plain, nonconst member // function, what other functions in our system must change and why? based on the question, the answer would be // answer bool compare(const Student_info&, const Student_info&); // because this function uses the member function as it's …

Member Avatar for mike_2000_17
0
266
Member Avatar for Vasthor

this is what the question said. // 9-1. Reimplement the Student_info class so that it calculates the // final grade when reading the student's record, and stores that grade // in the object. Reimplement the grade function to use this // precomputed value. this is what I thought! 1. Reimplement …

Member Avatar for Vasthor
0
226
Member Avatar for Vasthor

[Click Here](http://s16.postimg.org/rjkqfahp1/faulty1.png) I thought after the function call of gen_aux before the loop, the static call on the type for r should have make it declared. but why not? how static really works? this is what it's explained in the books:- static type variable; For local declarations, declares variable with …

Member Avatar for sepp2k
0
226
Member Avatar for Vasthor

map<string, vector<int> > // 42 xref(istream& in, // 43 vector<string> find_words(const string&) = split) // 44 error: [errorPic](http://s13.postimg.org/3y4vgjdev/compiler_error1.png) this is a cross-ref program that's written in the book, the exercise told me to create an improved feature for it. So, before I start with my work, I need to organise …

Member Avatar for Vasthor
0
423
Member Avatar for Vasthor

not working: // range for for (int (*row)[4] : ia) { for (int col : *row) cout << col << " "; cout << endl; } // error: cannot convert 'int*' to 'int (*)[4]' in initialization. working: // range for for (int (&row)[4] : ia) { for (int col : …

Member Avatar for Tumlee
0
938
Member Avatar for Vasthor

[Pictures](http://s10.postimage.org/v28zknfu1/Untitled5.png) I googled and found the solution [Solution](http://stackoverflow.com/questions/4702732/the-program-cant-start-because-libgcc-s-dw2-1-dll-is-missing) but I'm nub sooo, what is compiler flag? how to set it up? there multiple choice, so where should I start? Or should I just switch to IDE(Code::Blocks), the C++ Primer recommend me to use command-line interface compiler and compile it 'manually'. …

Member Avatar for deceptikon
0
181
Member Avatar for Vasthor
Member Avatar for mike_2000_17
0
153
Member Avatar for Vasthor

#include "splitzer.h" using namespace std; // find all the lines that refer to each word in the input map<string, vector<int> > xref(istream& in, vector<string> find_words(const string&) = split) { funtion body; } error: line 3, expected initializer before using error: line 6, expected constructor, destructor, or type conversion before "<" …

Member Avatar for rubberman
0
81
Member Avatar for Vasthor

if (__comp(__a, __b)) this is the error referred to the file above. basically, it's just about this question : 5-6. Rewrite the extract_fails function from ยง5.1.1/77 so that instead of erasing each failing student from the input vector v, it copies the records for the passing students to the beginning …

Member Avatar for Vasthor
0
270
Member Avatar for Vasthor

this is an unusual error, but maybe if the code presented here it's easier to recognize?! void sLetter(Word_store& s) { for ((s.words_input)::iterator it = (s.words_input).begin(); it != (s.words_input).end(); ++it) tolower(*it); (s.sWords).push_back(s.words_input); return; } the function is aim to converting each character in a string from a member of Word_store into …

Member Avatar for Vasthor
0
155
Member Avatar for Vasthor

Hey guys, probably no programming for a long time (around 3 days), I lost myself on this, the `dent_space1(max_space1, ' ')` just not compiling, for its format. if so, how can I 'delete space' for the sake of this task? 4-2. Write a program to calculate the squares of int …

Member Avatar for deceptikon
0
190
Member Avatar for Vasthor

[Link Anchor Text](http://s7.postimage.org/wdzzqzst7/weird_error.png) I click yes, thought so, this never popup when I'm compile any file before. [Link Anchor Text](http://s14.postimage.org/6bhslq23l/weird_error2.png) can anyone explain what I'm doing wrong here, I mean, I just copied all the code given in the book (Accelerated C++), then try to compile, but fail. help? =(.

Member Avatar for Vasthor
0
224
Member Avatar for Vasthor

what's the problem? E:\Tools\Programming\C++ Programming\CodeBlocks\Project\Knowledge_Based_Project\Exercise_Temporary_Compiler\Exercise_Temporary_3\main.cpp||In function 'int main()':| E:\Tools\Programming\C++ Programming\CodeBlocks\Project\Knowledge_Based_Project\Exercise_Temporary_Compiler\Exercise_Temporary_3\main.cpp|36|error: invalid use of member (did you forget the '&' ?)| ||=== Build finished: 1 errors, 0 warnings ===| [CODE] #include <algorithm> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; int main() { // informed user cout << …

Member Avatar for histrungalot
0
1K
Member Avatar for Vasthor

in coding, how do you actually track down the bug??? example this code where we want to find the quartile.... ignore the "odd" part, not done on there yet, but the even part just successfully running but produce no result after input (0, random huge number, and another 0) [CODE]#include …

Member Avatar for mike_2000_17
0
101
Member Avatar for Vasthor

hey guys, k, already 1 month I'm "leaving" my self-study on C++ for certain personal reason, I just learned the C++ two months before also, not much... I still can type in code and remember how most of the keyword works(that I learned), but I'm losing my ability to "think …

Member Avatar for thines01
0
140