d
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
test_memory
|
test_memory*
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|||||||
2
gen-C++
2
gen-C++
@@ -1,4 +1,4 @@
|
|||||||
c++ -o test_memory \
|
c++ -o test_memory_C++ \
|
||||||
-Ilanguage-C++/Memory/src \
|
-Ilanguage-C++/Memory/src \
|
||||||
language-C++/Memory/src/Memory.Aux.cpp \
|
language-C++/Memory/src/Memory.Aux.cpp \
|
||||||
language-C++/Memory/src/Memory.Test.cpp \
|
language-C++/Memory/src/Memory.Test.cpp \
|
||||||
|
|||||||
2
gen-Swift
Executable file
2
gen-Swift
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
swiftc -o test_memory_Swift \
|
||||||
|
language-Swift/src/test.swift
|
||||||
22
language-Swift/Memory/src/Memory.Aux.swift
Normal file
22
language-Swift/Memory/src/Memory.Aux.swift
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#include <map>
|
||||||
|
#include "Memory.h"
|
||||||
|
|
||||||
|
|
||||||
|
std::map<int, int> memory_generateConstPlayfield(
|
||||||
|
int n
|
||||||
|
) {
|
||||||
|
std::map<int, int> idGroups;
|
||||||
|
int id = 0;
|
||||||
|
for (int gid = 0; gid < n; ++gid) {
|
||||||
|
idGroups[id++] = gid;
|
||||||
|
idGroups[id++] = gid;
|
||||||
|
}
|
||||||
|
return idGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
func memory_generateConstPlayfield(
|
||||||
|
n: Int
|
||||||
|
) -> [Int: Int] {
|
||||||
|
var idGroups = [Int: Int]()
|
||||||
|
|
||||||
|
}
|
||||||
6
language-Swift/src/test.swift
Normal file
6
language-Swift/src/test.swift
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
print("Hello, world from Swift")
|
||||||
|
/*
|
||||||
|
std::cout
|
||||||
|
<< test_memory_generateConstPlayfield()
|
||||||
|
<< std::endl;
|
||||||
|
*/
|
||||||
Reference in New Issue
Block a user