Anonymous
Hello
Anonymous
Recently I learn modern cpp and today I find enum class which type can be specified by dev but
Anonymous
How many types can we use in cnum class
Anonymous
enum class EnumName :type{}
Anonymous
enum class EnumName :int {}
Anonymous
enum class EnumName :char{}
Anonymous
anything else?
Anonymous
I find I can't use custom class type here
Anonymous
Only integral types are allowed
-_-
Pls anyone send me code of this - Get Character from user , and check that Vowel or not , using function with argument and return value
Sid Sun
Think about it, you can get it
-_-
Think about it, you can get it
Not able to return the statement means , in sub function after condition check how to return that
Sid Sun
Not able to return the statement means , in sub function after condition check how to return that
Just do: return 1 (if vowel) Else 0 Check in parent function the value returned; if 1 just tell user it is vowel
Anonymous
🙏
Anonymous
hello
Anonymous
who is the owner of this bot ( @MissRose_bot )🤔
-_-
nah
Why?
Dima
Try to understand
-_-
Anonymous
?
We don't do your homework
Anonymous
"Pls sir pls send me code, it's not homework, pls sir"
-_-
Ok let me send photo of getting error can u help me in that ?
S.
Guys I have a "hello world" question on Windows ( #include <stdio.h> int main() { printf("Hello world!\n"); return 0; } And I do: cl /P /Fitemp.c hello.c cl /c /Fonul /FA /Fahello.asm temp.c ml /c /Fohello.obj hello.asm All of above are OK but: link /out:hello.exe hello.obj This gives me LIBCMT.lib(default_local_stdio_options.obj) : error LNK2005: ___local_stdio_printf_options already defined in hello.obj libvcruntime.lib(undname.obj) : error LNK2005: ___local_stdio_printf_options already defined in hello.obj hello.exe : fatal error LNK1169: one or more multiply defined symbols found
S.
Why? ( BTW I know I can still generate exe by use /force:multiple, but, for an obj generated directly from cl, it doesn't have that problem.
-_-
Why this is not possible ? Getting wrong output
Dima
lol
Dima
> 2019
Anonymous
All the turbo c++ indians...
Dima
turbo indians
Dima
Anonymous
xD
-_-
Actually our college syllabus based on turbo so we using this , sometime i use codeblocks n devcpp
S.
S.
Hi maestri, help me please
Anonymous
Sowwy, never done so much under windoze
Anonymous
-_-
/warn No code photos
Then how to solve my issue ? In text ?
Anonymous
Then how to solve my issue ? In text ?
We said how to paste your code. If you can't read that it's not our fault
Anonymous
.
S.
Sowwy, never done so much under windoze
it's pure pain ( and x86 only. For x64 they say the cl generated asm code is just for viewing not for assembling.
Shree
Why this is not possible ? Getting wrong output
Replace variable 'a' by 2 or more alphabets. Eg : ch
Anonymous
S.
Lel. The syntax is so weird I don't even can guess what exactly happends
cl /P /Fitemp.c hello.c /P: Writes preprocessor output to a file. /Fi: Sets the preprocessed output file name. cl /c /Fonul /FA /Fahello.asm temp.c /c: Compiles without linking. /Fonul: Create no obj file. /FA: Creates a listing file (asm). /Fa: Sets the listing file name. ml /c /Fohello.obj hello.asm /c: Compiles without linking. /Fo: Creates an object file.
S.
Weird <- cannot agree more
Anonymous
S.
S.
MS syntax
Voldemort
Why this is not possible ? Getting wrong output
Check the return value of function vowel , returning 'p' which is an integer while function return type is char , change char to int .
Anonymous
And probably he should write p = vowel(a); instead of vowel(a); :^)
Anonymous
But who knows
Voldemort
No just need to change the function return type from char to int.
Anonymous
Okay, if you think so, so nothing is a vowel :^)
Voldemort
After getchar();
Voldemort
p=vowel(a); should be there
Anonymous
Yes... as I said....
Anonymous
kek
Voldemort
Voldemort
Return value must be stored some where .
Anonymous
Actually it's not even a fault that he returns int instead of char
Anonymous
But it's not nice and unclean
-_-
Actually it's not even a fault that he returns int instead of char
How it can possible to return int type of data by defining function as char type ?
S.
Dig a little deeper. cl /c /Fohello1.obj hello.c ml /c /Fohello2.obj hello.asm For these two objs, linking hello1.obj ok but hello2.obj gives error "one or more multiply defined symbols found". But I can't find the actual difference between the two objs 🙁
Voldemort
Actually compiler never returns char
Voldemort
It returns ascii value of tge cagar
Voldemort
Char
S.
Dig a little deeper. cl /c /Fohello1.obj hello.c ml /c /Fohello2.obj hello.asm For these two objs, linking hello1.obj ok but hello2.obj gives error "one or more multiply defined symbols found". But I can't find the actual difference between the two objs 🙁
Dump of file hello1.obj File Type: COFF OBJECT COFF SYMBOL TABLE 000 01045E97 ABS notype Static | @comp.id 001 80000191 ABS notype Static | @feat.00 002 00000000 SECT1 notype Static | .drectve Section length 2F, #relocs 0, #linenums 0, checksum 0 004 00000000 SECT2 notype Static | .debug$S Section length 74, #relocs 0, #linenums 0, checksum 0 006 00000000 SECT3 notype Static | .data Section length E, #relocs 0, #linenums 0, checksum 2D04EA8 008 00000000 SECT3 notype Static | $SG4501 009 00000000 SECT4 notype Static | .text$mn Section length 14, #relocs 2, #linenums 0, checksum F829D91C 00B 00000000 SECT5 notype Static | .text$mn Section length A, #relocs 1, #linenums 0, checksum 71A05264, selection 2 (pick any) 00D 00000000 SECT6 notype Static | .text$mn Section length 29, #relocs 2, #linenums 0, checksum 2B25B17F, selection 2 (pick any) 00F 00000000 SECT7 notype Static | .text$mn Section length 3A, #relocs 2, #linenums 0, checksum CAE6D625, selection 2 (pick any) 011 00000000 SECT5 notype () External | ___local_stdio_printf_options 012 00000000 UNDEF notype () External | ___acrt_iob_func 013 00000000 UNDEF notype () External | ___stdio_common_vfprintf 014 00000000 SECT6 notype () External | __vfprintf_l 015 00000000 SECT7 notype () External | _printf 016 00000000 SECT4 notype () External | _main 017 00000008 UNDEF notype External | ?_OptionsStorage@?1??__local_stdio_printf_options@@9@9 (`__local_stdio_printf_options'::`2'::_OptionsStorage)