B
B
BadCats2020-03-27 23:30:31
PHP
BadCats, 2020-03-27 23:30:31

Error storing address in pointer?

The code:

int Europe_CountryCount=44;
    int** nextWorldPart = new int*[6];
    nextWorldPart[0]=&Europe_CountryCount;

Mistake:
error: 'nextWorldPart' does not name a type
nextWorldPart[0]=&Europe_CountryCount;

The above code is in .h file.
Cleaning and rebuilding the project didn't help.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DevMan, 2019-09-09
@ProstonN

$CONNECT = mysqi_connect('localhost' ,'u8310614_*****', '******' ,'u8310614_****');
missing ;at the end of the line.
well, mysqli_connectinsteadmysqi_connect

D
dpws, 2019-09-09
@dpws

See what kind of error is happening. mysqli allows you to do this:

$CONNECT = mysqi_connect('localhost' ,'u8310614_*****', '******' ,'u8310614_****');

if (!$CONNECT)
    echo "Код ошибки errno: " . mysqli_connect_errno() . PHP_EOL;
    echo "Текст ошибки error: " . mysqli_connect_error() . PHP_EOL;
    exit;
}

B
BadCats, 2020-03-28
@BadCats

nextWorldPart[0]=&Europe_CountryCount; It is neither a declaration nor a definition. This is an operator call that can only be executed in a function.

- answer by AR Hovsepyan
https://ru.stackoverflow.com/q/1100821/203448

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question