#ifndef TPNOFLAGS #define TPNOFLAGS 0x00000 /* フラグの設定なし―獲得できません */ #endif #define TPQCORRID 0x00001 /* 相関 id の設定/獲得 */ #define TPQFAILUREQ 0x00002 /* 障害キューの設定/獲得 */ #define TPQBEFOREMSGID 0x00004 /* メッセージ id の前にキューに登録 */...
#include<stdio.h>#include<stdlib.h>#ifndefMAX#defineMAX 10#endifintmain(intargc,charconst*argv[]){char*row1[]={"num","name","sum"};intcol1[]={1,2,3};char*col2[]={"one","two","three"};intcol3[]={1243,14234,3324};printf("%*s | %*s | %*s\n",-3,row1[0],-MAX...
#include<stdio.h>#include<stdlib.h>#include<string.h>#ifndefMAX#defineMAX 100#endifvoid*concatStrings(void*restrict dst,constvoid*restrict src,intc,size_t n){constchar*s=src;for(char*ret=dst;n;++ret,++s,--n){*ret=*s;if((unsignedchar)*ret==(unsignedchar)c)returnret+1;}return0;}...
それらのコードの上の行に #ifndef LOGIC_H //二重インクルード防止 #define LOGIC_H#define W 1 #define b 0 を記述すればヘッダーファイルは完成です。 あとはメインのプログラムから重みとバイアスの定義・プロトタイプ宣言の行を削除して、#include "logic.h"で作成したヘッダーファ...
Register as a new user and use Qiita more conveniently You get articles that match your needs You can efficiently read back useful information You can use dark theme What you can do with signing up Sign upLogin Comments No comments Let's comment your feelings that are more than good ...
#define _GNU_SOURCE #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #ifndef NUM_THREADS #define NUM_THREADS 4 #endif void *printHello(void *threadid) { long tid; tid = (long)threadid; printf("Hello There! thread %ld, kthread ID - %d\n", tid,...