This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "CoreMinimal.h" | |
#include "UObject/Interface.h" | |
#include "InterfaceDemo.generated.h" | |
UINTERFACE() | |
class UBaseInterface : public UInterface | |
{ | |
GENERATED_BODY() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#define GOODBYE std::cout << "Goodbye World!" << std::endl; | |
int main() | |
{ | |
std::cout << "Hello World!" << std::endl; | |
GOODBYE; | |
#ifdef KIDDING | |
std::cout << "Just kidding!" << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "static.h" | |
#include "shared.h" | |
#include <iostream> | |
void local_hello() | |
{ | |
std::cout << "Hello local world!" << std::endl; | |
} | |
int main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include "stack.h" | |
int main() | |
{ | |
Stack<std::string> notes; | |
notes.push("Hey"); | |
notes.push("what's"); | |
notes.push("up."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include "queue.h" | |
int main() | |
{ | |
Queue<std::string> orders; | |
orders.enqueue("burger"); | |
orders.enqueue("fries"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "unionfind.h" | |
int main(int argc, const char* argv[]) | |
{ | |
int node_count; | |
std::cin >> node_count; | |
std::cout << "Size: " << node_count << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
void exchange(Vector<T>& list, int i, int j) | |
{ | |
T temp = list[i]; | |
list[i] = list[j]; | |
list[j] = temp; | |
} | |
/** | |
* In a typical selection sort (a simple, but inefficient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
template<typename T> | |
void exchange(vector<T>& list, int i, int j) | |
{ | |
T temp = list[i]; | |
list[i] = list[j]; | |
list[j] = temp; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
void exchange(vector<T>& list, int i, int j) | |
{ | |
T temp = list[i]; | |
list[i] = list[j]; | |
list[j] = temp; | |
} | |
/** | |
* Part of the drawback of the insertion sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
template<typename T> | |
void exchange(vector<T>& list, int i, int j) | |
{ | |
T temp = list[i]; | |
list[i] = list[j]; | |
list[j] = temp; | |
} |
OlderNewer