Hi,
char *s="yamaha";
cout<<s<<endl;
int *p;
int i=10;
p=&i;
cout<<p<<endl;
1) For the 1st "cout" we will get "yamaha" as output. That is we are getting "content of the address" for cout<<s.
2) But for integer "cout<<p" we are getting the "address only".
Please clarify how we are... (2 Replies)
All ..
I am having a pointer array . And trying to store the addess into that pointer array . please see below the problem i faced
code:
int cnt1;
char *t_array;
char *f_array;
for(cnt1=0; cnt1<1000; cnt1++)
{
t_array =... (1 Reply)
Hello,
I'm trying to write a method which will return the extension of a file given the file's name, e.g. test.txt should return txt. I'm using C so am limited to char pointers and arrays. Here is the code as I have it:
char* getext(char *file)
{
char *extension;
int i, j;... (5 Replies)
The below code throws the error, since the size of x = 19 is not passed to the cstrCopy function.
using namespace std;
static void cstrCopy(char *x, const char*y);
int main ()
{
char x;
const string y = "UNIX FORUM";
cstrCopy(x,y.c_str());
return 0;
}
void cstrCopy(char *x,... (3 Replies)
I'm doing some coding in C++
Want to have a long empty string like below
const char ModMisfit :: DelStr = "\r \r";
However due to the long blank the line is very long. Is there any way to avoid this and keep the... (5 Replies)
Hi all,
Can anyone provide help with getting the right syntax regarding array/pointers in C in the following code? Can't locate a specific example which clarifies this...
Say I declare a typedef to an array of pointers to some type...
/**
* An array of ptrs to sections
*/
typedef... (4 Replies)
if i create an array of pointers to a structure "struct node" as:
struct node *r;
and create "n" number of "linked lists" and assign it to the various struct pointers r using some function with a return type as structure pointer as:
r=multiplty(.......) /*some parameters*/
is... (2 Replies)
Hello,
The purpose of the program is to print a sub string from the prompt inputs. I do not understand why char pointer does not work but char array will for line 40 and Line 41.
./a.out thisisatest 0 8
substring = "thisisat"And my code is:
#include <stdio.h>
#include <stdlib.h>
#include... (29 Replies)
I am struggling with the pointer to 2D-array (cf: 2D array of pointers). Can anybody help me elaborate how the pointer x moves in the memory to access the individual of y, especially the high lighted lines?
I have talked to one of the curators of the forum, but I am still not quite clear.
Here... (1 Reply)
I am passing a char* to the function "reverse" and when I execute it with gdb I get:
Program received signal SIGSEGV, Segmentation fault.
0x000000000040083b in reverse (s=0x400b2b "hello") at pointersExample.c:72
72 *q = *p;
Attached is the source code.
I do not understand why... (9 Replies)
Discussion started by: jose_spain
9 Replies
LEARN ABOUT DEBIAN
aa-notify
AA-NOTIFY(8) AppArmor AA-NOTIFY(8)NAME
aa-notify - display information about logged AppArmor messages.
SYNOPSIS
aa-notify [option]
DESCRIPTION
aa-notify will display a summary or provide desktop notifications for AppArmor DENIED messages.
OPTIONS
aa-notify accepts the following arguments:
-p, --poll
poll AppArmor logs and display desktop notifications. Can be used with '-s' option to display a summary on startup.
-f FILE, --file=FILE
search FILE for AppArmor messages
-l, --since-last
show summary since last login.
-s NUM, --since-days=NUM
show summary for last NUM of days.
-u USER, --user=USER
user to drop privileges to when running privileged. When used with the -p option, this should be set to the user that will receive
desktop notifications. This has no effect when running under sudo.
-w NUM, --wait=NUM
wait NUM seconds before displaying notifications (for use with -p)
-v, --verbose
show messages with summaries.
-h, --help
displays a short usage statement.
CONFIGURATION
System-wide configuration for aa-notify is done via /etc/apparmor/notify.conf:
# set to 'yes' to enable AppArmor DENIED notifications
show_notifications="yes"
# only people in use_group can use aa-notify
use_group="admin"
Per-user configuration is done via ~/.apparmor/notify.conf:
# set to 'yes' to enable AppArmor DENIED notifications
show_notifications="yes"
BUGS
aa-notify needs to be able to read the logfiles containing the AppArmor DENIED messages.
If you find any additional bugs, please report them to Launchpad at <https://bugs.launchpad.net/apparmor/+filebug>.
SEE ALSO apparmor(7)AppArmor 2.7.103 2012-06-28 AA-NOTIFY(8)