![]() ![]() It's not a bug, because it allows you to compile (and it's flagged as an alarm). ![]() The compiler alerts you with an alarm (not an error) that you are using an implementation-dependent feature (that is, it may work differently in other compilers). A multi-character literal or an ordinary character literal with a single character not representable by the execution character collection, is conditionally supported, has type int and has an implementation-dependent value. An ordinary character literal that contains more than one character is a multi- character literal. An ordinary character literal that contains a single character representable by the collection of run characters has type char, with a value equivalent to the numeric value of the encoding of that character in the collection of run characters. A character literal that does not begin with u8, u, U or L is an ordinary character literal.The C standard refers to these values in section 5.13.3.2 (highlighting and my translation): 5.13.3 Character literals When you enclose a string in single quotes, the compiler interprets it as an integer. Printf ("Elija el producto: \n 1: Coca Cola \n \n 2: Coca Cola Light \n \n 3: Coca Cola Sin Azucar \n \n 4: Sprite \n \n 5: Fanta \n \n 6: Ciel \n \n 7: Sidral Mundet \n \n 8: Del Valle \n \n 9: Fresca \n \n 10: Fuze Tea \n") Ĭ hides obscure and unknown features you have come across one of them. Printf ("Selecciona la marca de la cual quieres comprar un producto: \n 1: Coca Cola\n 2: Sabritas \n \n 3: Pepsi \n \n 4: Gamesa \n \n Marinela \n \n Tia Rosa \n") Int Coke, Sabritas, Pepsi, Gamesa, marca, Marinela, TRosa I'm starting to make a C program from a store, but I get the error multi-character character constant in the part I marked with *** : main () ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |