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.

0 Endorsements
~12.5K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.
Favorite Forums

11 Posted Topics

Member Avatar for meiyantao

Hello,everybody! I'm writing a LAN communication programming,and I need to transport a file between different host computer. I know that the TCP is a kind of stream-oriented connection.But look at the fallowing codes: [code=cplusplus] void TripPlanner::sendRequest() { QByteArray block; QDataStream out(&block, QIODevice::WriteOnly); out.setVersion(QDataStream::Qt_4_1); out << quint16(0) << quint8('S') << fromComboBox->currentText() …

Member Avatar for meiyantao
0
193
Member Avatar for meiyantao

Hello,everybody! I write my first Python script in file [B]Fibonacci.py[/B] in Linux as the fallowing: [CODE]a,b = 0,1 while b < 10: print b a,b = b,a+b[/CODE] When I want to run it,I must input these command in the command line: > python Fibonacci.py I want to know what should …

Member Avatar for meiyantao
0
127
Member Avatar for meiyantao

I am sorry for that I have solved it, just missing a ";" when I define the class. I have re-edited this thread. So sorry for flippancy!

Member Avatar for meiyantao
0
241
Member Avatar for meiyantao

Hello! I want to implement a avltree using C++,and I have do most of it,except the remove() algorithm. My question is when should I rotate the tree in remove(). I hope that any body can represent the situation for me using the Pelple's language,because the implemented code depend on the …

Member Avatar for meiyantao
0
163
Member Avatar for meiyantao

Hi,sir.I encounterred a person who said that C++ is an unsafe language.I try the follow code ,but when I input an non-int type,the program will fall in a bad loop.(gcc4.1 in Linux) [CODE] #include <iostream> #include <string> using namespace std; class bot { private: int password; public: bot():password(567){} virtual ~bot(){}; …

Member Avatar for Narue
0
258
Member Avatar for meiyantao

Hi,sir,please look at this code. [code] #include <iostream> using namespace std; class A{ private: class B; public: int out(int x){ return outB(x)->a; } B * outB(int x); private: B* root; class B{ int a; B(int init_a) :a(init_a){} friend class A; }; }; A::B* A::outB(int x){ root = new B(x); return …

Member Avatar for meiyantao
0
193
Member Avatar for meiyantao

This codeblock comes from Mr Weiss's book "Data Sturucture and Algorithm Analysis in C++"(Third Edition). I have some questions about it. [code=c] /** *This is a member function from the BinarySearchTree class. *And It try to find whether there's a element equal to x in *the binary search tree. */ …

Member Avatar for WolfPack
0
185
Member Avatar for ongxizhe

I like qt which is a C++ GUI class libarary. Qt's assistant may be a good tutorial for you! Good luck!

Member Avatar for ongxizhe
0
402
Member Avatar for meiyantao

I don't ensure whether "0" or "NULL" is better to be an empty point's value in C++. Could anybody can tell me,and why? Then how about it in C, why? Thank you!

Member Avatar for Narue
0
155
Member Avatar for meiyantao

I don't know how to sparate the interface and their implement.And I need some help from you.For example,I hope anybody can tell me,how to make these three files to work well. [CODE] //This file named main.cpp #include <iostream> #include "ABC.h" using namespace std; int main(void) { char y='y'; char e='e'; …

Member Avatar for meiyantao
0
182
Member Avatar for jenymaru08

//This is my code to solve your question.Want a go? [CODE=cpp] #include <iostream> using namespace std; int main() { int num; cout<<"Enter a factorial "; cin>>num; for(int line=1;line<=num;line++){ int list=line; for(int temp1=1;temp1<list;temp1++){ cout<<' '; } for(int temp2=list;temp2<num;temp2++) cout<<temp2; for(int temp3=num;temp3>=list;temp3--) cout<<temp3; cout<<endl; } }[/CODE]

Member Avatar for meiyantao
0
194

The End.