String objects vs char arrays in Arduino: A Practical Comparison - Arduino Uno Programming Basics

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 พ.ย. 2024

ความคิดเห็น • 5

  • @usercentered
    @usercentered หลายเดือนก่อน

    Like and agree to your video fully.
    The convenience of String objects win for me. I do most of my projects with ESP8266 or an ESP32 and I rarely see the need to use char arrays.
    Points to maybe address in a later video, the annoying need to guess char array sizes up front (e.g. for input) and the F() macro for memory.
    Cheers

  • @bob_mosavo
    @bob_mosavo 2 หลายเดือนก่อน +2

    The so-called shortcomings of string manipulation in C is as old as the hills. Using C++ for string manipulation makes string manipulation programming easier; however, how much more memory in a memory constricted device do you have to spare and how much many more instructions do you have to execute for easier string manipulation in C++❓ Accordingly, saying that using C++ for string manipulation is "better" makes no sense unless you can answer those two questions based on your hardware and your design specification 😜

    • @playduino
      @playduino  2 หลายเดือนก่อน

      Well put 😃

  • @bob_mosavo
    @bob_mosavo 2 หลายเดือนก่อน

    In C, anything between single quotes is a single character, e.g., '\0', '\t', 'A', '
    ', '3', etc.

    • @playduino
      @playduino  2 หลายเดือนก่อน +1

      Good point 👍