1,878 questions
1
vote
1
answer
121
views
dynamically resizing array in queue implementation [closed]
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, ...
3
votes
1
answer
164
views
C++: dynamic array unexpectedly working and on the scope of variables
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 ...
0
votes
0
answers
44
views
How to use complex formulas in data validation via VBA without Excel adding the @ symbol? [duplicate]
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.
...
0
votes
2
answers
78
views
Adding SORT or SORTBY into excel function
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 ...
0
votes
1
answer
205
views
Excel Filter Function based on a variable sized array of conditions + inputting results into a 2x2 grid
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 ...
1
vote
2
answers
186
views
How to keep a pointer to a Dynamic Array valid after resizing the array?
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 ...
0
votes
2
answers
103
views
Dynamic array first element remove complexity
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 ...
0
votes
1
answer
57
views
During the second call of strtok(), the code raises the following error: Invalid read of size 1
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-...
1
vote
0
answers
64
views
passing 2d c array to labview [duplicate]
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 ...
0
votes
2
answers
55
views
Excel MS365: 2-D dynamic array creation problem
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 ...
1
vote
1
answer
89
views
Declaration of dynamic array before getting array length [duplicate]
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 ...
2
votes
0
answers
81
views
R openxlsx - how to create overflowing array formula?
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.
...
0
votes
1
answer
47
views
Why is This _Generic Statement Giving an "Expression expected" Error?
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 ...
4
votes
3
answers
225
views
Creating a sequence table with different column counts [duplicate]
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 ...
0
votes
1
answer
39
views
Converting a dynamic string array to an object with keys
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 ...
2
votes
1
answer
183
views
Does redim use the heap or the stack memory in VBA?
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
...
0
votes
1
answer
41
views
free of struct 1 with an array of struct 2, inside of struct 2 there is an array of int
typedef struct partition_struct {
int* elements;
int last; //last element index
int dim; //n allocated int
} partition;
typedef struct partitions_struct {
partition* partitions;
...
0
votes
2
answers
128
views
Converting complex Formula into Dynamic Array
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 ...
-2
votes
1
answer
79
views
Choosing Named Range via formula
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 ...
0
votes
2
answers
58
views
SIGBUS Error while accessing pointer in Implementation of Dynamic Arrays
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 ...
0
votes
2
answers
701
views
Excel Filter Function on an Array Result
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 ...
0
votes
4
answers
89
views
Dynamic array in C pass by pointer
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, ...
-1
votes
1
answer
59
views
Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
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 ...
1
vote
1
answer
99
views
EXCEL problem -> Function that searches for correct column based on headline and returns specific cells if they match values listed on list
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.
...
1
vote
2
answers
154
views
What value to assign to a char* in default constructor c++?
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 ...