Advertisement
Guest User

vtgyivyjthjcgfgjvh

a guest
Mar 18th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.21 KB | None | 0 0
  1. // ConsoleApplication2.cpp : This file contains the 'main' function. Program execution begins and ends there.
  2. //
  3.  
  4. #include "pch.h"
  5. #include <iostream>
  6. #include <string>
  7.  
  8. using namespace std;
  9.  
  10.  
  11. int a, b, c, d;
  12. rekord* nazwy;
  13. rekord* aktualny;
  14.  
  15. struct rekord {
  16.     string* str;
  17.     int* num;
  18.     char* ch;
  19.     bool* log;
  20.     int ilosc_wyszukan;
  21.     rekord* next;
  22. };
  23.  
  24.  
  25.  
  26. void wyszukaj() {
  27.     int numer = 0;
  28.     for (int i = 0; i < a + b + c + d; i++)
  29.         cout << nazwy->str[i]<<endl;
  30.     cin >> numer;
  31.     if (numer <= a)
  32.         string szukana;
  33.     else if (numer <= a+b)
  34.         int szukana;
  35.     else if (numer <= a+b+c)
  36.         char szukana;
  37.     else if (numer <= a+b+c+d)
  38.         bool szukana;
  39.     else if (numer < a + b + c + d)
  40.         cout << "zla wartosc";
  41.  
  42.     while (aktualny->next) {
  43.         if()
  44.     }
  45. }
  46.  
  47.  
  48. int main()
  49. {
  50.     //otwierasz plik z danymi
  51.     //zczytujesz liczbe zmiennych (a,b,c,d)
  52.  
  53.     nazwy = new rekord;
  54.     //ustalasz nazwy zmiennych
  55.     nazwy->str=new string[a + b + c + d];
  56.     nazwy->str[0] = "Imie";
  57.     //itd
  58.     //dodajesz kolejne rekordy i ich wartosci
  59.     aktualny = new rekord;
  60.     nazwy->next = aktualny;
  61.     aktualny->str = new string[a];
  62.     aktualny->num = new int[b];
  63.     aktualny->ch = new char[c];
  64.     aktualny->log = new bool[d];
  65.  
  66.     aktualny->str[5] = "asdf";
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement