syng | open source , cross-platform , Chinese-To-English dictionary | Dictionary library
kandi X-RAY | syng Summary
kandi X-RAY | syng Summary
Syng is a free, open source, Chinese-To-English and English-To-Chinese Dictionary app that makes it easy to lookup words and phrases quickly. Currently Syng works on macOS, Windows, and Linux systems.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of syng
syng Key Features
syng Examples and Code Snippets
Community Discussions
Trending Discussions on syng
QUESTION
So I have an issue that has been bugging me for days now. I have 3 classes : Film, Csalad, Dokumentum. These 3 classes describe movie/film categories, basically "Csalad" is family friendly films, "Dokumentum" is a document film. And everything else is in the Film class. The Film class is the parent class, which has a few a private char* typed small "arrays" (like: char* cim[25+1], that's for the title). And it's child classes has some special private variables like: char* eletkor[2+1] for the Csalad class. The problem is that I have succesfully read my necassery data from a txt file, into a syngly linked list(in the txt file every line has a special type with that I can easly decide which film is in which category, and make them into the right class, for example: if something is a simple film I make for them in the Film constructor, if it's a family friendly film I make them in the Csalad constructor). But I have problems printing them onto the screen. My main goal is to go through my linked list and basically print every single data onto the screen. It sounds easy, but it's not, cause I can't find a method that can both print out the title for example (which is located in the Film class, and intherited by every single other class like Csalad) and can print out Csalad's private variable eletkor.
Can you guys help me?
Here's some code:
"kov" means next in English.
Film.h
...ANSWER
Answered 2021-Apr-01 at 10:32Not sure if its a strong requirement to use char
arrays but I will be explaining one possible implementation you can have with standard C++. Know that all std::string
operations have an equivalent C style operation you can perform (albeit, with a lot more boiler plate code)
Consider the following constraints:
- A film has basic properties representable as a string
- Derived classes have custom properties that are representable as a string
- Printing a film or derived class MUST present all properties as a string
First let's consider the string representation for Film
and its derived classes
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install syng
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page