Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15229

VS 2017 What is the counterpart of this C pointer programme in VB.Net?

$
0
0
I'd like to know how the following programme on pointer written in C can be written in VB.Net, especially how to use the keywords in the C programme like &i and *p in VB.Net. Please clarify.

Code:

#include <stdio.h>

void f(int *p, int *q)
{
        p = q;
        *p = 2;
}

int i = 0, j = 1;

int main()
{
        f(&i, &j);
        printf("%d %d \n", i, j);
        return 0;
}


Viewing all articles
Browse latest Browse all 15229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>