Clieck “File” in XCode 2. Copy & paste the library git link 3. Set the dependency 4. Waiting for download
Git: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
Delete the host name by the prompt, and then push codes again.
How to set icon color in Swift?
We can set the icon from SF Symbols in the code: But what if we don’t like the default color of the icon? We can change them by:
Structures and Classes in Swift
Comparing Structures and Classes Structures and classes in Swift have many things in common. Both can: Define properties to store values Define methods to provide functionality Define subscripts to provide access to their values using subscript syntax Define initializers to set up their initial state Be extended to expand their functionality beyond a default implementation …
How to upload big files(like videos) to GitHub?
1. Down git-lfs [link](https://git-lfs.com/) 2. In command line 3. Tracking file type 4. Add gitattribute file 5. push
How and Why to use dynamic_cast in C++?
When you assign an object of a derived class to an object of a base class, the derived class portion of the object gets sliced off. So if you simply try to call the employee base class operator= function to copy the entire employee portion of the object, the derived class portion will be lost. …
Keyword “const” in C++
When declaring a member function as const, it means that the function is not allowed to modify the object on which it is called. This allows you to call the function on a const object, ensuring that the object’s state is not changed. In the case of the getFirstName() member function in the example I …
“A:class type redefinition” error in C++
The error “class type redefinition” typically means that you have multiple definitions of the same class in your code, which can cause conflicts and errors. This error can occur if you have included the header file for class A in both A.cpp and B.cpp, or if you have included it multiple times in B.cpp. When …
How to declare and initialize a static variable in C++?
A static value is associated with the class rather than individual objects. In C++, the static data members are declared inside the class definition but defined outside the class definition. When you declare a static variable in the header file, it creates a declaration of the variable in every file that includes the header. And …
Continue reading “How to declare and initialize a static variable in C++?”