Похожие чаты

Silly question on CPP, im from C89. char buf[6]; buf = "hello"; Is

this assign on buf correct for a CPP compiler?

8 ответов

22 просмотра

Should be. You can't just try it?

That is correct I guess

looks very cursed

char buf[6]; strcpy(buf, "hello");

Thomas
char buf[6]; strcpy(buf, "hello");

Why not char buf[6] = "hello";

void- Автор вопроса
Thomas
char buf[6]; strcpy(buf, "hello");

I think this is the propper way, buy I want to know if: buf = "hello"; Is valid for CPP compiler.

Похожие вопросы

Обсуждают сегодня

Карта сайта