I am using a structure defined as follows
struct gene_square
{
double *x;
double *y;
};I have class, with a member function which is a pointer of this type:
gene_square* m_Genes;I am allocating memory in the constructors like this:
m_Genes = new gene_square;
for (ii=0;... (1 Reply)
Hi All,
My latest assignment (practice not coursework!) is to write prototype interactive exam/test console application. I've used structs to store the question information (not sure if this was the best way to do it?) and I have the following code that outputs each question and it's possible... (0 Replies)
I have two or more linked lists that have the same names for their "next". For example,
struct server_t {
sockaddr_in * sin;
server_t * next_;
}
struct player_t {
char name;
player_t * next_;
}
How can I get a function to take in either type and manipulate the pointers?
I... (3 Replies)
Can someone tell me how to do this?
Just a thought that entered my mind when learning about structs.
First thought was:
struct one
{
struct two;
}
struct two
{
three;
}
one->two->three
would this be how you would access "three"? (1 Reply)
Hi, i'm trying to copy a struct into a binary file using the unix instruction write, so i declare and fill the struct "superbloque" in one function "initSB" and then i pass the pointer to another function called bwrite (for block write) which calls write. The problem is that i call the function... (2 Replies)
I am trying to work out the best syntax for a relatively simple operation. The goal is to declare an instance of a struct and pass it around to be populated and have the data manipulated. There is an extra wrinkle in that the functions are in different src files.
The main is simple,
#include... (5 Replies)
Hi,
I have received an application that stores some properties in a file. The existing struct looks like this:
struct TData
{
UINT uSizeIncludingStrings;
// copy of Telnet data struct
UINT uSize;
// basic properties:
TCHAR szHost; //defined in Sshconfig
UINT iPortNr;
TCHAR... (2 Replies)
In C++ there is a struct with the following structure:
typedef struct myStruct
{
string s_date;
float fA;
float fB;
float fC;
.....
float fZ;
} myData;
After some computations on the values of the struct members are inserted into a database table:
myData... (4 Replies)
Store args passed in array but not the first 2 args.
# bash
declare -a arr=("$@")
s=$(IFS=, eval 'echo "${arr}"')
echo "$s"
output:
sh array.sh 1 2 3 4 5 6
1,2,3,4,5,6
Desired output:
sh array.sh 1 2 3 4 5 6
3,4,5,6 (2 Replies)
Discussion started by: iaav
2 Replies
LEARN ABOUT FREEBSD
archive_entry_copy_link_w
ARCHIVE_ENTRY_PATHS(3) BSD Library Functions Manual ARCHIVE_ENTRY_PATHS(3)NAME
archive_entry_hardlink, archive_entry_hardlink_w, archive_entry_set_hardlink, archive_entry_copy_hardlink, archive_entry_copy_hardlink_w,
archve_entry_update_hardlink_utf8, archive_entry_set_link, archive_entry_copy_link, archive_entry_copy_link_w, archve_entry_update_link_utf8,
archive_entry_pathname, archive_entry_pathname_w, archive_entry_set_pathname, archive_entry_copy_pathname, archive_entry_copy_pathname_w,
archve_entry_update_pathname_utf8, archive_entry_sourcepath, archive_entry_copy_sourcepath, archive_entry_symlink, archive_entry_symlink_w,
archive_entry_set_symlink, archive_entry_copy_symlink, archive_entry_copy_symlink_w, archve_entry_update_symlink_utf8 -- functions for manip-
ulating path names in archive entry descriptions
LIBRARY
Streaming Archive Library (libarchive, -larchive)
SYNOPSIS
#include <archive_entry.h>
const char *
archive_entry_hardlink(struct archive_entry *a);
const wchar_t *
archive_entry_hardlink_w(struct archive_entry *a);
void
archive_entry_set_hardlink(struct archive_entry *a, const char *path);
void
archive_entry_copy_hardlink(struct archive_entry *a, const char *path);
void
archive_entry_copy_hardlink_w(struct archive_entry *a, const, wchar_t, *path");
int
archive_entry_update_hardlink_utf8(struct archive_entry *a, const char *path);
void
archive_entry_set_link(struct archive_entry *a, const char *path);
void
archive_entry_copy_link(struct archive_entry *a, const char *path);
void
archive_entry_copy_link_w(struct archive_entry *a, const wchar_t *path);
int
archive_entry_update_link_utf8(struct archive_entry *a, const char *path);
const char *
archive_entry_pathname(struct archive_entry *a);
const wchar_t *
archive_entry_pathname_w(struct archive_entry *a);
void
archive_entry_set_pathname(struct archive_entry *a, const char *path);
void
archive_entry_copy_pathname(struct archive_entry *a, const char *path);
void
archive_entry_copy_pathname_w(struct archive_entry *a, const wchar_t *path);
int
archive_entry_update_pathname_utf8(struct archive_entry *a, const char *path);
const char *
archive_entry_sourcepath(struct archive_entry *a);
void
archive_entry_copy_sourcepath(struct archive_entry *a, const char *path);
const char *
archive_entry_symlink(struct archive_entry *a);
const wchar_t *
archive_entry_symlink_w(struct archive_entry *a);
void
archive_entry_set_symlink(struct archive_entry *a, const char *path);
void
archive_entry_copy_symlink(struct archive_entry *a, const char *path);
void
archive_entry_copy_symlink_w(struct archive_entry *a, const wchar_t *path);
int
archive_entry_update_symlink_utf8(struct archive_entry *a, const char *path);
DESCRIPTION
Path names supported by archive_entry(3):
hardlink Destination of the hardlink.
link Update only. For a symlink, update the destination. Otherwise, make the entry a hardlink and alter the destination for that.
pathname Path in the archive
sourcepath Path on the disk for use by archive_read_disk(3).
symlink Destination of the symbolic link.
Path names can be provided in one of three different ways:
char * Multibyte strings in the current locale.
wchar_t * Wide character strings in the current locale. The accessor functions are named XXX_w().
UTF-8 Unicode strings encoded as UTF-8. This are convience functions to update both the multibyte and wide character strings at the
same time.
The sourcepath is a pure filesystem concept and never stored in an archive directly.
For that reason, it is only available as multibyte string. The link path is a convience function for conditionally setting hardlink or sym-
link destination. It doesn't have a corresponding get accessor function.
archive_entry_set_XXX() is an alias for archive_entry_copy_XXX().
SEE ALSO archive(3), archive_entry(3)BSD February 2, 2012 BSD