• Register

Recent questions tagged array

0 votes
1 answer 3 views
Problem Hey, man, I want to create a dynamically 2D array inside a class in c++.so, provide me the relevant answer.
asked 3 days ago chris jordan 440 points
0 votes
1 answer 9 views
Problem: I am learning php arrays and i wonder how can we get the highest value in multidimensional array using php.
asked 5 days ago prog_learner 1.5k points
0 votes
1 answer 6 views
Problem Hey, I just want to know that how to convert std::vector into array[ ] in c++
asked 5 days ago chris jordan 440 points
0 votes
1 answer 5 views
Problem: Hi there! I am trying to convert an integer number to a byte array using following snippet: static void Main(string[] args) { int i = 44; byte[] b = Convert.ToByte(i); //Error foreach (byte byt in b) Console.WriteLine(byt); Console.ReadKey(); ... says “Cannot implicitly convert byte to byte[]”. Does anybody have any idea why this error is occuring and how can I resolve it?
asked 5 days ago Sheeza 3.4k points
0 votes
1 answer 5 views
Problem: Hi there! I am working with arrays and I am trying to delete the element at index 4 using RemoveAt() method. This method is not working with arrays and I am facing an error that says: “no definition for RemoveAt() exists…….”. What should I do? Why is this error occurring? Please guide if I am doing something wrong.
asked Nov 15 Sheeza 3.4k points
0 votes
1 answer 16 views
Problem: I just started learning programming from an UDEMY course but there are still some point which i an unclear about I want to ask method that how i can check that array is empty or doesnot exist what i need to do please tell me. The problem with me is I am not able to find the correct method to do it please guide step by step for this. Thanks in Advance.
asked Nov 10 Han Li 710 points
0 votes
1 answer 7 views
Here is my JavaScript code so far: var linkElement = document.getElementById("BackButton"); var loc_array = document.location.href.split('/'); var newT = document.createTextNode(unescape(capWords(loc_array[loc_array.length-2]))); linkElement.appendChild(newT); Currently it takes the ... the last item in the array to be index.html and if so, bring the third to last item instead. Please help.
asked Nov 10 Han Li 710 points
0 votes
1 answer 6 views
I need to make a [console] program that gets the full names of five people, as well as their three grades to calculate their average. Instead of declaring variable by variable string nom1, nom2 //... int cal1, cal2 //... I want to make a for loop (or ... at the end because "the identifiers are not defined". Is it possible to achieve this, or is it something that not even magic can achieve?
asked Nov 8 sasha 2.2k points
0 votes
1 answer 7 views
Problem: I was able to fill a first array with the integers and display it, but I can't make a second array with the odd numbers found in the first array. using namespace std; #include <iostream> #include <cstdlib> Function to load the first array: void load (int vec [10]) { int i; for (i = 0; i <= 10; ... [cont] = vec [i]; cont ++; } } for (i = 0; i <tam; i ++) { cout << vec2 [i]; } return 0; }
asked Nov 8 sasha 2.2k points
0 votes
1 answer 11 views
Problem: Hello Kodlogs, I tried hashing two columns in on CSV file and then save the hashed column in another CSV file. But I got this error: stack level too deep (systemstackerror) I think there is something wrong with how I input my array code. Why am I getting such an error and can you help me out?
asked Nov 5 Festus James 280 points
0 votes
1 answer 6 views
Problem: It turns out that I am trying to make a test program that returns two arrays (Odd, Even) to the main function from another function. My question lies in how to return those two arrays. At first I thought of putting them inside just one in the form of pointers and ... < Odd [0]; // here it should show 1, but show 4 instead return 0; } Hope the question was understood, thanks in advance.
asked Nov 5 sasha 2.2k points
0 votes
1 answer 16 views
Problem: I was trying to create a script that would read decimal numbers and convert them into binary by storing them in a vector with the library <vector> #include <iostream> #include <vector> #include <string.h> using namespace std; int main () { ... 217it returns me☻101100 Specifically, whatever number you type always comes out with either the 02 or the 16th character. Why is this happening?
asked Nov 5 sasha 2.2k points
0 votes
1 answer 6 views
Problem: The program deals with an ATM, which has 5 options: 1 check balance. 2 Withdraw money. 3 Deposit money. 4 show last 5 movements. 5 exit. My problem is in the last 5 movements, since I must save the data, that is, the inquiries withdrawals and deposits that the user makes, with ... in a moment ...." << endl; Sleep (10000); system ("cls"); menu_of_operations (); break; } } while (opc <5); }
asked Nov 5 sasha 2.2k points
0 votes
1 answer 9 views
Problem: When creating an array of characters I don't have to put const to it to be valid char str [11] = "Hello World"; Instead when I create it with a pointer I have to do it as follows const char * str = "Hello World"; I understand that it is ... why the same does not happen with an array, I can create it without prepending const and I even have the possibility to modify the assigned literal.
asked Nov 5 sasha 2.2k points
0 votes
1 answer 7 views
Problem: When trying to put an object to an array that is found as an attribute of a class, I get the error "Not viable overloaded '='". I understood that arrays are pointers so it made sense to put objects into it through a pointer. Where am I wrong? #include <iostream> class Object ... count ++; } }; int main () { Box box1 (5); Object * pointer1 = new Object ("object1"); box1.add (pointer1); }
asked Nov 5 sasha 2.2k points
0 votes
1 answer 12 views
Problem: C ++ program that reads a flat file (mycode.txt) with the sequence ATCGGATCGCCAATGCGGATGCTTTATAATCCGTA # ( It is a file created in notepad with the name mycode.txt and is located in the folder where my compiler saves the cpp and exe ) The program must store the sequence in a char type array ... +) arr [i] = l.toCharArray (); } } int main () { file sequence; file.Open (); return 0; } `` ''
asked Nov 5 sasha 2.2k points
0 votes
1 answer 18 views
Problem How do I convert multidimensional array to single array in php?
asked Oct 31 hashq 1.1k points
0 votes
1 answer 10 views
0 votes
1 answer 6 views
Problem: I am working with arrays in C# and I have an integer array that I want to convert into string. Is it possible to convert an integer array to string? If yes, how?
asked Oct 23 Sheeza 3.4k points
0 votes
1 answer 10 views