Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Variable or Object with Names from text file c++ [closed]

Tags:

c++

file

text

I'm wondering if you can set or create a Variable or Objects name from text file.

example: text file("Iron Copper Steel")

read the file and create a new Variable or Object with the name "Iron" then continue reading and create a new object or variable named "Copper", etc.

like image 208
user3085497 Avatar asked Mar 03 '26 17:03

user3085497


1 Answers

No you cannot.

Object names/variable names are fixed before compiling the code.

You want to use an interpreted language

like image 196
Ed Heal Avatar answered Mar 05 '26 06:03

Ed Heal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!