Category "pointers"

What is causing "warning: assignment from incompatible pointer type error"?

I'm trying to experiment here with pointer arithmetic, but I get this warning. I am unable to understand where is this going wrong. The code is written to p

Converting char * to Uppercase in C

I'm trying to convert a char * to uppercase in c, but the function toupper() doesn't work here. I'm trying to get the name of the the value of temp, the name be

Find address of constant in go

We have written one program by which we try to find an address of a constant. Is it possible to do it like that? package main func main() { const k =

cannot convert int (*(int))(int) to int (*(int))(int)

i'm trying to learn about function that returning a pointer to a function, after i tried to compile the code, it gives me this kind of error: cannot convert

Question about sharing mmapped area between 2 different processes

I'm trying to share mmapped area in 2 processes. In my program, I create memory_update() process and memory_read() process. This memory_update() process update

Pointer receiver method compilation problem: Cannot call a pointer method on 'MyObj{}'

I have the following method defined: func (o *MyObj) parse(something string) string { // Do stuff } This code (1) compiles just fine: (&MyObj{}).parse(

Is an iterator in C++ a pointer?

Is an iterator in C++ a pointer? The reason I ask is that it seems like nobody completely understands what an iterator is. It's just a "thing" or a "value" they

How do I do a literal *int64 in Go?

I have a struct type with a *int64 field. type SomeType struct { SomeField *int64 } At some point in my code, I want to declare a literal of this (say, w

f2py compilation error with type(c_ptr) from iso_c_binding

Summary I am trying to write a model using Fortran and I need to use a function to integrate (closed limits). I tried working with fgsl and the standalone scrip

What is the difference between std::reference_wrapper and a simple pointer?

Why is there a need to have std::reference_wrapper? Where should it be used? How is it different from a simple pointer? How its performance compares to a simple

pcl::PointCloud<pcl::PointXYZ> to pcl::PointCloud<pcl::PointXYZ>::Ptr (Covert poincloud to ptr)

I am using PCL 1.3. Is there any function to convert pointcloud to pointcloud::ptr. I am new at PCL libraries. I have a ROS node subscribing to sensor_msgs/Poin

Insertion sort error occurring in a C program

I am probably missing something simple here, but I was looking over some simple algorithms in C and have not been able to get the insertion sort in the code bel

How to get the pointer of return value from function call?

I just need a pointer to time.Time, so the code below seems invalid: ./c.go:5: cannot take the address of time.Now() I just wonder why? Is there any way t

Are Python variables pointers? Or else, what are they?

Variables in Python are just pointers, as far as I know. Based on this rule, I can assume that the result for this code snippet: i = 5 j = i j = 3 print(i) wou

Trying to reverse ObjPtr to an Object I'm getting kernel not found error 53 in 64 bits but not in 32 bits

I'm referring Parent class from Child class; instead of simply do, for example: Public Property Set Parent(obj As ClassProperties) Set this.ParentColl = ob

Acces element of QVector pointer containing pointers

I have the following QVector pointer: QVector<someStruct*>* qvp; How can I acces someStruct members? Let's assume that qvp has some elements to access al

How to check c++ pointer pointing to invalid memory address?

Is there anyone show me how to check my pointer is pointing to an invalid memory address. #include<iostream> class Node{ public: int data; Node * ne

What is the size of a pointer?

Is the size of a pointer the same as the size as the type it's pointing to, or do pointers always have a fixed size? For example... int x = 10; int * xPtr = &a

warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)’

I am trying to run a simple C program but I am getting this error: warning: format ‘%s’ expects type ‘char *’, but argument 2 has ty

warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)’

I am trying to run a simple C program but I am getting this error: warning: format ‘%s’ expects type ‘char *’, but argument 2 has ty