Skip to content
Advertisement

Tag: arrays

C++, addresses in array [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 years ago. Improve this question I have some sort of funny question about addresses in C++. I have such code: This code works, but allocation of addresses fears me. Does

passing bash array to python list

I’m trying to pass an array from bash to python using the old getenv method however I keep getting this error: could someone please explain why the $mdcNo isn’t passing from bash to python successfully? Code .sh: code .py: Answer If you want to pass a shell array to the Python script, your best bet is to do so as

Convert char array of C into string of C++

I need to convert char array of C into string c++ but the char array is an element of struct. Code: This is my Structure in C and I want to access name[50] in c++ but for that I have to convert it into string. I have tried strcpy and memcpy. I am using ESL_BOOL status; and it is working

How to read a file line by line

I try to read a file line by line. File to read: Script: When I execute the script, this window will be opened: (Notice how some values are repeated, and the contents don’t correctly alternate between names and versions): I’d like to create an array with all package names and versions. Answer You don’t need a counter for this at

Output results from Linux command into a table with PHP

I’m mid way through clobbering together a captive portal to run on a Raspberry Pi and have the basics working, but I’m now stumbling whilst creating some administration pages. What I am essentially trying to do is create a table in HTML/PHP so that I have the ability to “kick” users from the service. I have a script already in

ruby Array.inspect vs. Array[element].to_s

I’m working with an array, which we’ll call books, of complex objects, which we’ll call Book. The problem is when I call puts “#{books.inspect}”, ruby outputs a stream of binary (unreadable utf8 characters). However, when I call puts #{books[0].to_str}”, I get a brief, pretty output that describes the book in question. Not sure if it is relevant, but Book is

Advertisement