C++ ile yazdığım bir telefon defteri programı, Ubuntu’da yazıldığı için windows’altında çalıştırmak için dosya yolunu tam girmeniz gerekmekte ( c:\example.txt gibi) Ayrıca strcmp char kontrolu yapmadığından, isim’i tek karakter girmeyin. Bir kaydı silmek için temp dosyası kullandım. Silinicek kayıt hariç bütün kayıtlar temp’e kayıt edildikten sonra dosyanın adını değiştirdim. Umarım işinize yarar. It’s a phone … Read more
I wrote c code to read from a file char by char. Finally, it counts char number and print it. How to read file with C 1. Get file name to open. 2. Open file to read. 3. Get a char. 4. Print char. 5. Print total char in the file. #include void main () … Read more
Design patterns is used in software to solve common problem. They can be grouped into 3 category (Creational patterns, Structural patterns, and Behavioral patterns) You can find some information about design patterns here Creational Patterns Abstract Factory (87) Provide an interface for creating families of related or dependent objects without specifying their concrete classes. Builder … Read more
Here is the question, homework is containing the stack library ( written by me ), inheritance, nested if, constructor, destructor. You can see the sample. I had 2 hours to finish and send , so it is not a perfect code. (Even i would have time, i don’t think i can write perfect code ) … Read more
A class can allow non-member functions and other classes to access its own private data, by making them as friends. This part of C++ tutorial essentially gives two important points. Once a non-member function is declared as a friend, it can access the private data of the class similarly when a class is declared as … Read more
