---
name: "Mat_VarGetStructFieldnames"
section: "3"
platform: "linux"
package: "libmatio"
version: "1.5.30-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Mat_VarGetStructFieldnames"
---

# Mat\_VarGetStructFieldnames(3)

Get the fieldnames of a structure variable.

## NAME

**Mat\_VarGetStructFieldnames** – Get the fieldnames of a structure variable.

## SYNOPSIS

**#include \<matio.h\>**

*char* *\** *const* *\**\

**Mat\_VarGetStructFieldnames**(*const matvar\_t \*matvar*);

## DESCRIPTION

The **Mat\_VarGetStructFieldnames**() function returns the fieldnames of the structure variable *matvar.*

## RETURN VALUES

An array of fieldnames is returned of the variable is a valid structure variable. Otherwise NULL is returned. The **Mat\_VarGetNumberOfFields**() function returns the number of fields for the structure.

## SEE ALSO

[Mat\_VarGetNumberOfFields(3)](/Mat_VarGetNumberOfFields/3.md)
