Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. // 4problemd.cpp : Defines the entry point for the console application.
  2. //
  3. #include "stdafx.h"
  4.  
  5.  
  6. #include <stdio.h>
  7. #include <iostream>
  8. #include <fstream>
  9.  
  10. using namespace std;
  11.  
  12. class subelement
  13. {
  14. public :char * value;
  15. subelement * address;
  16. subelement(char * val, int length)
  17. {
  18. this->value = new char[length];
  19. this->value = val;
  20. this->address = address;
  21. }
  22. ~subelement()
  23. {
  24. delete this->value;
  25. }
  26.  
  27. };
  28.  
  29. class list
  30. {
  31. private:
  32. int n;
  33. int length;
  34. int position;
  35. subelement * prev;
  36. subelement * first;
  37. public :
  38. list ( char * val, int length )
  39. {
  40. this->first = new subelement(val, length);
  41. this->length = length;
  42. n = 1;
  43. this->prev = this->first;
  44. this->position = 0;
  45. }
  46. void add ( char * val )
  47. {
  48. subelement *next = new subelement(val, length);
  49. prev->address = next;
  50. this->prev = next;
  51. next->address = 0;
  52. }
  53.  
  54.  
  55. };
  56.  
  57. int main()
  58. {
  59. ifstream infile;
  60. ofstream outfile;
  61. infile.open ("radixsort.in");
  62. outfile.open ("radixsort.out");
  63. int n, k, m;
  64. infile >> n >> k >> m;
  65.  
  66.  
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement