As an implementation detail, most modules have the name __builtins__ made available as part of their globals. The value of __builtins__ is normally either this module or the value of this module’s __dict__ attribute. Since this is an implementation detail, it may not be used by alternate implementations of Python.
float *k = new float[polynomsize];
greeting = " Hello!!!";
result = strcat(greeting, name); // Сдесь программа вылетает
CppHello::~CppHello() {}
.name = value;
.greeting = " Hello!!!";
.strcat(greeting, name);
cc -o tr main_0.o main_1.o
PROJECT = tr
SOURCES = main_0.c main_1.c
OBJECTS = $(SOURCES:.c=.o)
HEADER_DEPS = $(SOURCES:.c=.d)
.PHONY: all
all: $(PROJECT)
$(PROJECT): $(OBJECTS)
$(CC) $(CFLAGS) $^ -o $@
-include $(HEADER_DEPS)
%.o: %.c
$(CC) $(CFLAGS) -MM -MT $@ -MF $(patsubst %.o,%.d,$@) $<
$(CC) $(CFLAGS) -c $< -o $@
.PHONY: clean
clean:
$(RM) $(PROJECT) $(OBJECTS) $(HEADER_DEPS)
-l<libname>
.gcc -c file.c `pkg-config --cflags <libname>`
gcc file.o -o file `pkg-config --libs <libname>`
$ make
$ make clean
mkdir cmake-build
# Создаём папку для сгенерированных файлов, чтобы не смешивались с исходниками
# Это называеться out-of-source build
cd cmake-build
# Генерируем проект или Makefile
cmake ..
# Запускаем билд, можно просто запустить make
cmake --build .
qmake
make
мне нужно чтоб здесь вывелось "card, s, s" и всеstr.replace(reg, (sp, match) => { console.log(sp,match) // card, s, s })
const str = "card's ff bal s fdfgbal dkjgkjsff others";
const reg = new RegExp('(card).*(s).*(s)', 'g');
str.replace(reg, (match, p1, p2, p3, offset, string) => {
console.log(match, p1, p2, p3, offset, string)
})
template <typename container>
void print(const container& c)
{
auto it = begin(c);
while(it != end(c) && cout << *it++, it != end(c)) { cout << ", "; }
}
#include <iostream>
#include <functional>
template <typename T>
class defer {
private:
std::function<T()> mFunctor;
public:
defer(std::function<T()> functor) : mFunctor(functor) {}
~defer() { mFunctor(); }
};
int main() {
defer<void> d([] { std::cout << "Deferred func!" << std::endl; });
//...
std::cout << "Hello, world!" << std::endl;
if (true) {
return 0;
}
//...
if (false){
return 1;
}
return 0;
}