#include سلام دوستان کسی اگر میتونه این برنامه بصورت گونه template بنویسه ممنون میشم... #include "stdafx.h" class node class link node *first,*last; void link::addnode(string n, string l) void link::shownodes() while (first != last) cout << first->name << " " << first->last << endl; // eshare gare this estefade kon first=first->next; } } int main() test.shownodes(); [/CPP] - - , .
برچسب:
نویسنده: محمد رضا جوادیان
درباره سایت
آخرین مطالب
امکانات وب
#include <iostream>
#include <string>
using namespace std;
{
friend class link;
string name;
string last;
node *next;
public:
node(string n, string l) { name = n; last = l; }
};
{
public:
void addnode(string n, string l);
// delnode();
void shownodes();
};
{
node *newnode;
newnode = new node(n, l);
if (first == NULL)
first = last = newnode;
else
{
newnode->next = first;
first = newnode;
}
}
{
{
{
link test;
test.addnode("mohsen", "n");
test.addnode("ebi", "m");
retu 0;
}صفحه بندی
آرشیو مطالب
خبرنامه