Category "pointers"

Call a function using a pointer and pass it along in the parameters

Say that I have a pointer to function theFunc. theFunc takes along a pointer that points to the address where theFunc is stored . Is this possible? Using it wou

Is it possible to destroy the memory via pointer?

First I promise that I won't do anything bad with this. I'm just curious. #include <stdlib.h> #include <stdio.h> int main(int argc, char ** argv) {

Weird issue with Vue / Javascript variables

I honestly don't even know how to search for this question (what search param to write) but either way its bit weird issue and I am desperate for help. So I am

C++: How to do a matrix multiplication with pointers? Error: argument of type int is incompatible with parameter of type int**

I need to multiply two matrices, I have a header file where the function product is, and I need to call it in main. I am not very familiar with pointers, so I d

How do you assign a multidimensional array of pointers to a multidimensional array of values in C?

I'm working on a Sudoku Solver, and I have to evaluate values in RealPuzzle (without changing them), and then decide whether or not the desired number can go so

Pointer to single bytes of vector of doubles

I have vector of doubles and I need to have pointer with access to each single byte (probably char *ptr). Can you tell me how to assign pointer to char to vecto

Go: Invalid memory address or nil pointer dereference when reading files and strings at same time

I have the following function waitForInput that listens for TCP input, after the connection has been created and that one has been assigned to the client struct

Differentiating custom Typescript Interfaces that have the same fields

I have a custom interface like this: interface Pointer<T> { id: string } id is a pointer to other data structures, but the id field doesn't contain inf

initialization of 'const char **' from incompatible pointer type 'char *'

I am new in learning C. I have an issue in returning double star pointer from the function. This is my code. #include <stdio.h> #include <stdbool.h>

Deleting a pointer to a pointer causes "Invalid address specified to RtlValidateHeap" error

I was solving a simple math question which needs to add solutions continuouslly to the answer set. So I designed a class with a pointer to a pointer in it. When

Remove an element from array of structs with pointers

I have to implement the appointmentData_remove function which removes an element of type tAppointment from the tAppointmentData array. Data types are defined li

C code collecting info through a function and passing it back, of datatype struct

//Program is to collect input from user so that can pass the array of inputs from the user to another print function but that are quite some Errors in the code

Create a linked list with the characters of a string-C90

The problem : I am trying to create a linked list which contains the characters of a string in each field of the linked list(to get the distance of each letter

How to delete a heap allocated std:::array

I have this pointer in a class: std::array<std::array<std::array<Item*, XSize>, YSize>, ZSize>* Items; In the constructor: Items = new std::a

Length of array in function argument

This is well known code to compute array length in C: sizeof(array)/sizeof(type) But I can't seem to find out the length of the array passed as an argument t

C pointer to a pointer confusion

I have the following code. I tried to change the value of y by using a pointer to a pointer (i.e. trying to do a de-referencing twice from the pointer that poin

How do I convert a number to a string without using stdlib.h or string.h?

Here is my exercise: Write a function that receives from the user two strings that show two real numbers (possibly negative), And produces a string that contai

Pointers - Strings

I have a code chunk which is quite meaningless for me. Is there someone can explain it to me? Thanks int strLength(char *str) { char *p = str; // Go until the e

I'm having a problem creating a linked list [duplicate]

#include<stdio.h> #include<stdlib.h> void insert_front(struct node* head, int block_number); void insert_rear(struct node* head,

Recomended formating for temporarily inverting data at pointer and then passing pointer to temporarily inverted data

Long story short, I have a pointer to a value that is stored inverted, so when we are calculating a hash to verify data integrety, we need to invert the data th