Software project management first time job

Source: Internet
Author: User

A self-introduction

My name is Gao Yu, from Jilin Liaoyuan, although the undergraduate stage has been exposed to some small projects, but in addition to undergraduate students have not independently completed a comparative system of projects, for programming self-thinking ability is not strong, from graduation to now written code is very few, through the course of learning, but also to their own an upgrade, Will do their best to follow down, but also want to see whether they can persist in this respect, can accumulate a little bit.

Two GitHub Learning

I and Cao Chunxia together, upload code is divided into the client directly upload, as well as command line upload (I use command line upload), because there is no successful establishment of the warehouse (message verification is unsuccessful, the problem is as follows)

, so the code has not been uploaded successfully,

The word frequency statistic code is as follows:

#include <string> #include "Word.h" #include <regex> #include <iostream> #include <fstream> Using namespace Std;bool sortbynum (word* W1, word* W2) {if (W1 && w2) {return w1->getnum () > w2-&    Gt;getnum (); } return true; void Sortvector (std::vector<word*> vec) {Std::sort (Vec.begin (), Vec.end (), sortbynum);}    void Printallobject (std::vector<word*> vec) {ortvector (VEC); for (auto P:vec) {if (p) {std::cout << P->getword () << ":" << p->getnum ()        << Endl; }}}void Delectallobject (std::vector<word*> vec) {for (int i = 0; i < vec.size (); ++i) {Auto P = ve        c.at (i);        if (p) {delete p; }}}int Main (int argc, const char * argv[]) {const char* filename = "/USERS/ERICWANG/DESKTOP/WORDSFREQUENCY/WORDSFR        Equency/word.txt ";    Absolute file path char* buffer;    Long size;    Ifstream file (filename, ios::in|ios::binary|ios::ate);  Open File size = File.tellg ();    Get file length file.seekg (0, Ios::beg);    Buffer = new Char[size];            File.read (buffer, size);        File.close ();                   Std::vector<word*> VEC;               Const Std::regex pattern ("\\w+");    Regular expression matching pattern std::string target = buffer;    Const Std::sregex_token_iterator END; for (Std::sregex_token_iterator I (Target.begin (), target.end (), pattern); I! = end; ++i) {Std::strin                         G S = *i;              word* p = new Word ();                        P->setword (*i);                               P->setnum ();                    BOOL Isexist = false; for (auto P:vec) {//fast traverse vector to see if the word already exists, auto gets the object type stored in the vector. P represents an object to be fetched if (P &am                                       p;& (P->getword () = = *i)) {//If the removed P is not empty and the word p is currently matched to the *i isexist = true;        Set Isexist to True to indicate that the word already exists p->setnum ();                               Add the number of times to use the word 1 break; The word end fast traversal has been found}} if (!isexist) {///If the fast traversal ends, the value of Isexist is still false, representing this            is a newly found word that needs to be stored inside the vector vec.push_back (p);    Push to the last position of the vector}} printallobject (VEC);       Output result Delectallobject (VEC);          Delete all created objects delete buffer; Delete buffer string return 0;} #include <stdio.h> #include "Word.h" Word::word (): Word (""), num (0) {}word::~word () {}void Word::setword (std:: string s) {word = s;} std::string Word::getword () {return Word;} void Word::setnum () {++num;} uint16_t Word::getnum () {return num;} BOOL Word::operator > (const word& pinfo) const{return num > pinfo.num;} BOOL Word::operator < (const word& pinfo) const{return num < pinfo.num;} #ifndef wordsfrequency_word_h#define wordsfrequency_word_h#include <iostream>using namespace Std;clThe Word {Public:word ();    ~word ();    void Setword (std::string s);    std::string Getword ();    void Setnum ();    uint16_t Getnum ();    BOOL operator > (const word& pinfo) const;    BOOL operator < (const word& pinfo) const;private:std::string Word; uint16_t num;}; #endif

  

You also need to continue to complete the code upload function.

Software project management first time job

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.