Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include "Napis.h"
- #include <stdio.h>
- #include <iostream>
- using namespace std;
- Napis::Napis()
- {
- }
- Napis::~Napis()
- {
- }
- const char* Napis::Zwroc() const
- {
- return m_pszNapis;
- }
- void Napis::Ustaw(const char* nowy_napis)
- {
- strncpy(m_pszNapis, nowy_napis, 40);
- /* int i = 1;
- for (int i = 0; nowy_napis[i] != '\0'; i++)
- {
- m_pszNapis[i] = nowy_napis[i];
- }
- m_pszNapis[i] = '\0';
- }
- */
- }
- void Napis::Wypisz() const
- {
- cout << m_pszNapis;
- /* int i = 0;
- while (m_pszNapis[i] != '\0')
- {
- cout << m_pszNapis;
- i++;
- }
- }
- */
- }
- void Napis::Wpisz()
- {
- cin >> m_pszNapis;
- }
- int Napis::SprawdzNapis(const char* por_napis) const
- {
- if (strcmp(m_pszNapis, por_napis) == 0)
- return 0;
- else if (strcmp(m_pszNapis, por_napis) > 0)
- return 1;
- else return -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement