1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

文字列の配列で遊ぶ。(memcpy)(ちょつと工夫)

Posted at

x M5NanoC6での予定は、未定
x いろいろ、違いは、各自考えよう!!!

オンラインコンパイラ



#include <iostream>
#include <string.h>  //memcpy
using namespace std;
int main(void){
    // Your code here!
    
    char line[2][10];
    
    #define P0 "abc"
    memcpy(line[0], P0, (sizeof P0)); 
    #define P1 "def"
    memcpy(line[1], P1, (sizeof P1)); 

    printf("%s\n",line[0]);
    printf("%s\n",line[1]);
    
}




abc
def

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?