Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
122 views

I'm trying to write a queue that will store strings. Using GDB I can tell that I make a memory allocation error in the function resizeQueue. Here's the exact message: Program received signal SIGTRAP, ...
user31051859's user avatar
11 votes
2 answers
366 views

The following two codes behave as expected: char* test1 = new char[20]{"abc"}; cout << test1; Outputs: abc int size = 20; char* test1 = new char[size]{'a','b','c'}; cout << ...
petat_irrumator's user avatar
3 votes
1 answer
169 views

I'm super duper new to coding and I'm just learning this as a hobby. I'm following a course and this is the code I wrote (user input to a dynamically created array): #include <iostream> using ...
Ellon Feyneth's user avatar
6 votes
2 answers
201 views

I have a user-defined class Person and I want to create a variable-sized array (size taken at runtime) of Person pointers. The following code works as expected. Person **arr = new Person* [size]; ...
Newton's in-law's user avatar
0 votes
0 answers
44 views

I'm facing two related problems while working with VBA in Excel. Both involve complex formulas, but they behave differently when set through VBA compared to when entered manually in the Excel UI. ...
Handsome Green's user avatar
-3 votes
1 answer
171 views

I am sorry if the question is stupid. The problem is that memory for my dynamic array inside a static structure is not being allocated. The reason might be my pc (it is a really old notebook with only ...
Safarov Arthur's user avatar
0 votes
2 answers
84 views

I am looking to add a sortby or sort function into my query but can't figure out how. =TAKE(CHOOSECOLS(FILTER(Revenue,(Revenue[Top Product]=$C$66)*(Revenue[Location]=$C$67)),1,2,17),10) Here is what ...
Matt9080's user avatar
0 votes
2 answers
161 views

I have a code where I need to delete last element of array. I made this code but I am wondering is there a more optimised way of doing this? My version: void DeleteLast(int** array, int* size) { ...
Safarov Arthur's user avatar
0 votes
1 answer
218 views

I am looking to make a pre-existing function more dynamic such that the user can readily change the filter conditions without needing to delve into the formula and changing manually. I would prefer a ...
Eng001002's user avatar
-1 votes
1 answer
90 views

I am working with flex/bison to create an interpreter for a class. The problem that I am encountering seems to be related to using/converting a dynamic vector. I am trying to create a function to ...
Justin Smith's user avatar
1 vote
2 answers
186 views

I have a dynamic array, and I need to maintain a pointer to it. Here's the setup: var Controls: TArray<TControls>; Items: ^TArray<TControls>; begin Items := @Controls; end; The ...
zeus's user avatar
  • 13.3k
1 vote
2 answers
439 views

I have a array with JSON strings and each JSON has a different key. Also, the size of the array is not fixed and may increase or decrease in occurrences. An example of this is below : "[{"...
Anupam Chand's user avatar
  • 2,779
0 votes
2 answers
103 views

I was reading about CPython’s implementation of list.pop(k) method and learned that it takes O(n-k) to remove the kth element of the list since it needs to move the posterior elements one position to ...
Osniel Teixeira's user avatar
0 votes
1 answer
113 views

I'm a computer science student and one of the questions on a test asked to implement realloc in C using malloc. My teacher said the correct answer would be to get the sizeof of the previous array and ...
PublicEnemy0's user avatar
0 votes
1 answer
57 views

I am new to C++ and I do not understand why the code doesn't continute tokenizing the text array, and instead raises the error. I suspect that the problme might be because of passing the token ptr mid-...
Astor's user avatar
  • 3
6 votes
6 answers
599 views

I would like to aggregate, merge, compact some values as shown below The input is a table and the output is dynamic array formulas on a single Cell and has a goal to aggregate other columns based on ...
RtMt's user avatar
  • 65
1 vote
0 answers
64 views

I want to create a dll that gets some data and put them in a 2d array and then pass it to labview the problem is all I get is a pointer instead of the whole array I allocate array in c by using malloc ...
alireza m's user avatar
0 votes
0 answers
36 views

I have been studying DSA and don't understand how ctypes.py_object works. As of my knowledge it works on concept of pointers to create an array of pointers that will store memory addresses for values ...
Waqar Abbas's user avatar
0 votes
2 answers
60 views

I have an Excel problem that boils down to the following: Given the input range A1:B3 (a 2-D array), is it possible to use only formulas to create the output D1:K3? I would like to use the input ...
Rui's user avatar
  • 3
0 votes
0 answers
164 views

INTRODUCTION / DESIRED RESULT I am trying to create a table that automatically updates and that can be filtered. In this table, I want to add a dynamically column total at the end of the 'time ...
FFF-PK's user avatar
  • 1
1 vote
1 answer
89 views

In dynamic allocation of arrays at runtime, when the array is declared before getting the array length, I encountered a behavior that could not explain. In the following code, the user provides the ...
Mahdi's user avatar
  • 235
0 votes
1 answer
218 views

In Go, people use "slices" as dynamic arrays, because plain arrays have sizes that should be known at compile time. But while equality is conceptually simple for dynamic arrays, Go does not ...
MWB's user avatar
  • 12.7k
2 votes
0 answers
85 views

I am trying to create an overflowing array in R using openxlsx. My end result will have the user change items into row 1, so I need the UNIQUE formula to dynamically add/remove values after exporting. ...
owaiapu's user avatar
  • 61
2 votes
2 answers
58 views

I have M many 2-D matrices of dimension (2 x n_1 ,2 x n_2 , 2 x n_3,..., 2 x n_N ). I can store them in a MATLAB cell-array of dim (2 x N x M) where N = {n_1 , n_2 , n_3,..., n_N} and n_1,n_2,n_3 are ...
zuko7's user avatar
  • 79
0 votes
1 answer
48 views

I am writing an implementation of a dynamic array in C11. The keyword _Generic comes along with the C11 standard and is supported in my version of GCC (14.1.1) as far as I know. I have worked with it ...
Zenais's user avatar
  • 146
1 vote
0 answers
107 views

The following function compute the square matrix arrayrmsd, but the result is different depending on the value of export OMP_NUM_THREADS=x (x = number of cores used). Differences are low but ...
Carlo Nervi's user avatar
4 votes
3 answers
226 views

I'm hoping to create a TOCOL in excel of an array of values based on variable criteria. Eg. When it meets one criteria, I wish for it to be able to return an array of values associated with that ...
user25539466's user avatar
1 vote
1 answer
58 views

I'm trying to work through one of the assignments for MITOpenCourseware's Introduction to Algorithms: Sisa Limpson is a very organized second grade student who keeps all of her course notes on ...
monopoly's user avatar
  • 676
0 votes
1 answer
39 views

I have the following string array: let arrayExample = ['', 'test1', 'test2', '', 'test3', 'test1', '']; This is also dynamic, so the size can change at any given time. I would like to be able to ...
LOL. NO.'s user avatar
  • 707
3 votes
4 answers
318 views

I have been wrestling with ChatGPT (and losing) trying to find an answer to this one. This is a sample of weekly data displayed in A2:D43021 of Sheet1. DATE ARTIST SONG THIS WEEK 1/3/1970 Diana Ross &...
GBMedusa's user avatar
  • 183
2 votes
1 answer
185 views

I know this is quite strange to ask for a language that is far from a low-level language such as C and C++, but it caught my attention that for example if I do this: Dim tempArray(0 To 2) As Integer ...
Isaias's user avatar
  • 63
0 votes
0 answers
218 views

[Solved]Edit2: So I figured out the issue and replaced the at function by putting the array strings into a string to assess the positions in the string. THis still caused an issue when reading spaces, ...
Dan's user avatar
  • 1
0 votes
1 answer
41 views

typedef struct partition_struct { int* elements; int last; //last element index int dim; //n allocated int } partition; typedef struct partitions_struct { partition* partitions; ...
SKOP_'s user avatar
  • 3
0 votes
1 answer
216 views

There appears to be an error in excel formula when combining XLOOKUP with MAKEARRAY formula: e.g. This is a simplified example. I have used y values of constant increments to make the formula easier ...
Nick's user avatar
  • 927
0 votes
2 answers
129 views

Trying to create a Dynamic array from a somewhat complex formula but keep getting #N/A errors randomly. For some reason, the y value of the equations doesn't like it. Effectively the #N/A for the ...
Nick's user avatar
  • 927
0 votes
1 answer
81 views

I'm trying to create an item and box system, where a box can have a flexible amount of items inside it (i.e. not wasting memory by making every box have 50 items, when some will have just a few). I am ...
Robin Bubeník's user avatar
-2 votes
1 answer
79 views

So I have this formula: At a high level, the formula goes like this: If [Dynamic Array #1] = False, 0, Index( If [Dynamic Array #2] = 1, Named Range A, Named Range B <-- Problem ...
Kaz's user avatar
  • 1,332
6 votes
5 answers
626 views

With data in A1 - B5: A 1 //remove A 2 B 3 //remove B 2 C 1 How do you remove duplicates in column A, keeping the last set of values in other columns? Results should look like this: A 2 B 2 C 1 I'...
user avatar
0 votes
2 answers
58 views

It is just a partial implementation of dynamic arrays, all functions haven't yet been implemented and wanted to just check the working of a function. This is the code #include <stdio.h> #include ...
Anonymousstriker38596's user avatar
0 votes
0 answers
22 views

I want to allocate memory for a two-dimensional array of char in a separate function. I defined a double pointer in the main function, then I passed this pointer into my separate function alloc_arr(), ...
elo2cx's user avatar
  • 33
0 votes
2 answers
710 views

For background, my job requires me to make up large amounts of mock data. Large like 100s of thousands of rows, and array formulas seem to be the best option to scale these activities. Onto the ...
Chris Friederich's user avatar
1 vote
2 answers
605 views

I have generated a spilled array function that returns a value if two conditions are met. I have a raw data table with all my data, and then I have "my table", which is the table where I ...
Minouuuu's user avatar
0 votes
4 answers
93 views

To make it straight forward: one can see there are two function declaration below. void tableau_initialize(int Rn, int slack_num, int Cn, int A[Rn][Cn], int B[Rn], int C[Cn+1], float ***A_tableau, ...
Mingqiang LI's user avatar
0 votes
1 answer
57 views

I want to use and Excel formula, not VBA, to create an array with the following values: The formula must allow the range to grow dynamically as a copy it down horizontally and vertically. There are a ...
MarkJ's user avatar
  • 1
-1 votes
1 answer
66 views

Sorry for my bad english) I created a dynamic array of structures. This structures contains dynamic array of doubles. When I add the structure, I fill it this way The number of sides and the length of ...
Vladimir_gr's user avatar
1 vote
1 answer
203 views

EDIT 1 → 2024-03-30: Included parameters in the lambda functions so the table names and columns may be injected by the user Updated lambda functions with such paramteres Even though I found a ...
Ricardo Diaz's user avatar
  • 5,726
1 vote
1 answer
99 views

I am working with a relatively large dataset, which has been extracted from MIKE+ and into Excel. The real dataset is about pipes, where I need to return all the pipes that are the same materials. ...
Minouuuu's user avatar
0 votes
2 answers
117 views

I'm trying to write a dynamic array that will allow me to enter a unique number of vehicles through the function addVehicle but im struggling on how to use the array and add items to it. I read that ...
RALPH123's user avatar
1 vote
2 answers
154 views

I have a class String and I've made a field char* name, default, parameterized, copy constructor, destructor and overwritten operator =. My question is how my default constructor should look like for ...
zaraboy's user avatar
  • 21
1 vote
1 answer
1k views

If you have 5 rows of data with values 1,2,3,4,5, how can a dynamic array formula be used to create 10 rows of data by inserting a blank item after each element. So the results should be an array of ...
user avatar

1
2 3 4 5
38