Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication2.cpp : This file contains the 'main' function. Program execution begins and ends there.
- //
- #include "pch.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int a, b, c, d;
- rekord* nazwy;
- rekord* aktualny;
- struct rekord {
- string* str;
- int* num;
- char* ch;
- bool* log;
- int ilosc_wyszukan;
- rekord* next;
- };
- void wyszukaj() {
- int numer = 0;
- for (int i = 0; i < a + b + c + d; i++)
- cout << nazwy->str[i]<<endl;
- cin >> numer;
- if (numer <= a)
- string szukana;
- else if (numer <= a+b)
- int szukana;
- else if (numer <= a+b+c)
- char szukana;
- else if (numer <= a+b+c+d)
- bool szukana;
- else if (numer < a + b + c + d)
- cout << "zla wartosc";
- while (aktualny->next) {
- if()
- }
- }
- int main()
- {
- //otwierasz plik z danymi
- //zczytujesz liczbe zmiennych (a,b,c,d)
- nazwy = new rekord;
- //ustalasz nazwy zmiennych
- nazwy->str=new string[a + b + c + d];
- nazwy->str[0] = "Imie";
- //itd
- //dodajesz kolejne rekordy i ich wartosci
- aktualny = new rekord;
- nazwy->next = aktualny;
- aktualny->str = new string[a];
- aktualny->num = new int[b];
- aktualny->ch = new char[c];
- aktualny->log = new bool[d];
- aktualny->str[5] = "asdf";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement