weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 05:59 PM |
| In C++ Arrays are the equivalents of Tables in Lua, correct? |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 06:00 PM |
| Yeaaaaaaaaaaaaaaaaaaaaaaaaaah. |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 18 Aug 2013 06:00 PM |
| "equivalent" implies complete equality. Tables and arrays are not equal, as an array can only have one type of data and a table can have different types. |
|
|
| Report Abuse |
|
|
krauqpu
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 126 |
|
| |
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:01 PM |
K, that's what I thought.
When I first heard the word I thought it was some weird mathematical function or something that I wouldn't use... |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:01 PM |
Whatever, pretty much the same.
~ Siggy ~ |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 18 Aug 2013 06:03 PM |
| No, they are not pretty much the same. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 06:03 PM |
| You do realize I was being completely sarcastic, right? |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:03 PM |
Yeah, yeah they are...
They store multiple data values. That's all that I need it for..
If there is something closer to a table in C++ I would love to know about it though. |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:04 PM |
Tables = multiple data values Arrays = multiple data values
Close enough for what I'm gonna be using them for. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 06:05 PM |
| No, arrays store multiple values, not multiple data values. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 06:07 PM |
What about a hash? I know that Perl [not C++, but they have many similarities] you can store any type of data value in a hash, so why not in C++? |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:07 PM |
same shet.
Data = stoff Values = stoff. |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:07 PM |
DF, you mean a hash "hides", not stores.
I find hashes useless btw, because everybody has hashing calcs. I'd make my own randomized. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 06:08 PM |
| Okay, go store strings and floats in an int array, tell me how that works out for you. |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:10 PM |
...
I never said I needed it for multiple types of data. And how WOULD I go about doing that for a pas, register, and login sort of sytem? |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 06:10 PM |
| In C++, do you store strings as arrays of chars..? |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:11 PM |
| No, but it would be useful for my hashing algorithm/encrypt-er. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 06:12 PM |
| You said arrays and tables were basically the same thing and part of the basic part of a table is it holds mutliple data types, so why cant you store your strings and floats in a int array? Cause an array is not a table. |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:18 PM |
| I said data VALUES, as in variables, not TYPES, as in int, string, double, float, etc. |
|
|
| Report Abuse |
|
|
woowee5
|
  |
| Joined: 29 May 2013 |
| Total Posts: 32 |
|
| |
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 18 Aug 2013 06:23 PM |
| C++.New::Array(Typoe:IsInt(yes.......), values = 1 2 3 and 4). |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 18 Aug 2013 06:41 PM |
| Whatever above me is too gross to read. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2013 06:46 PM |
Hi weewoo5!
How are you today? Are all your questions answered?
The Unwise Wizard of Scripters has spoken. |
|
|
| Report Abuse |
|
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 18 Aug 2013 06:49 PM |
| Wait, aren't we supposed to set off an alarm or something? |
|
|
| Report Abuse |
|
|