Search:

Type: Posts; User: boyhailong

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    3,133

    ok!thank you!

    ok!thank you!
  2. Replies
    9
    Views
    3,133

    if don't use std::string ,how to write ?

    if don't use std::string ,how to write ?
  3. Replies
    9
    Views
    3,133

    the operator "="error in class "String"

    #include <iostream>
    using namespace std;
    class String
    {
    public:
    String(const char *str = NULL); // 通用构造函数
    String(const String &another); // 拷贝构造函数
    ~ String(); // 析构函数
    String& operator...
  4. thank you for your answer. ihave correct it and...

    thank you for your answer. ihave correct it and test correctly.
  5. erroe when write the member function“mergeList” in a linear list

    #include<iostream>
    using namespace std;
    const int DefaultSize = 100;
    class List
    {
    public:
    List();
    List(size_t size);
    List(List &L);
    ~List();
  6. Replies
    5
    Views
    1,636

    ok , that's the thing ,i correct it ,thank you !

    ok , that's the thing ,i correct it ,thank you !
  7. Replies
    5
    Views
    1,636

    type casting error

    i just want to calculate the length of char*,so i write

    int len(char* str)
    {
    int i = 0;
    while (*str != "/0")
    {
    ++i;
    ++str;
    }
  8. how to write mergeList in a liner List C++ class writing by array

    i just write a class below :

    #include<iostream>
    using namespace std;
    const int DefaultSize = 100;
    class List
    {
    public:
    List();
    List(size_t size);
  9. What is one possible symptom of having called free on the same block of memory twice?

    who can explain ? thank you
  10. Replies
    10
    Views
    1,900

    yes , the template programming just can solve the...

    yes , the template programming just can solve the question !
  11. Replies
    5
    Views
    1,612

    that's right! the size of the array should be...

    that's right! the size of the array should be included in the display function not compare with NULL, because the compile just take 0 as NULL, so when *t=0,the loop is over ,and you do twice...
  12. Replies
    11
    Views
    1,678

    i think in this easy program , the easy syntax...

    i think in this easy program , the easy syntax structure is enough !
  13. Replies
    2
    Views
    1,048

    show your code maybe clear!

    show your code maybe clear!
  14. Replies
    3
    Views
    1,769

    very good !

    very good !
  15. Replies
    5
    Views
    2,903

    it looks like C#

    it looks like C#
  16. Replies
    8
    Views
    2,375

    you can write like this : //Purse #include...

    you can write like this :

    //Purse
    #include <iostream>
    #include <iomanip>
    #include <string>
    using namespace std;

    class Purse
    {
  17. you can clear the buffer in cin before input just...

    you can clear the buffer in cin before input just like this :

    // print your name n times

    #include <iostream>
    #include <cstdlib>
    #include <cstring>
    #include <string>
    using namespace std;
  18. Replies
    10
    Views
    1,691

    #include using namespace std; class X...

    #include<iostream>
    using namespace std;
    class X
    {
    private:
    int x;
    public:
    X():x(){};
    void d(){cout<<x;};
    void test(X p)
  19. Replies
    5
    Views
    1,343

    good !

    good !
Results 1 to 19 of 19