Sponsored Content
Full Discussion: Reg: char ptr - Coredumps
Top Forums Programming Reg: char ptr - Coredumps Post 60027 by google on Friday 7th of January 2005 12:51:28 PM
Old 01-07-2005
Code:
#include <stdio.h>
void main()
{
int Index=1;
char *Type=NULL;


Type = (char *)Index;
printf("%s",Type);

}

Well, Im still learning C just a novice. Looking at the code above though, Index does not have a new line terminus. Printf wont know when to stop printing. Is this why it cores?
 

10 More Discussions You Might Find Interesting

1. Programming

file ptr.

Is there any way to know the filename from an available file pointer. (2 Replies)
Discussion started by: bankpro
2 Replies

2. AIX

Configuring Color Laser ptr in AIX

Hi All, I have Network color laser printer which is to be configured in AIX5L. The Model of the printer is OKI C3200. Will it is supported with AIX 5..? I could not find any drivers for this. Will any compatible drivers are available for this printer... I tried with the default drivers hplj-4... (2 Replies)
Discussion started by: helloajith
2 Replies

3. Solaris

Coredumps and swap - was part of Solaris Mem Consumption

We have Sun OS running on spark : SunOS ciniwnpr67 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-V440 Having Physical RAM : Sol10box # prtconf | grep Mem Memory size: 8192 Megabytes My Top Output is : 130 processes: 129 sleeping, 1 on cpu CPU states: 98.8% idle, 0.2% user, 1.0%... (39 Replies)
Discussion started by: rajwinder
39 Replies

4. Programming

int *ptr + max possible value

From reading my C book, Im aware that the integers have a maximum value which depends on what type of processor you are using (since they use 16-bit or 32-bit instructions). Now I know pointers are very flexible, since they can reference anything, but in the case of integer pointers, can they... (4 Replies)
Discussion started by: JamesGoh
4 Replies

5. Programming

Adding a single char to a char pointer.

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)
Discussion started by: pallak7
5 Replies

6. AIX

Zerofault terminates and coredumps - Segmentation fault

Hi, I am using zerofault in AIX to find memory leaks for my server. zf -c <forked-server> zf -l 30 <server> <arguments> Then after some (5 mins ) it terminates core dumping and saying server exited abnormally. I could not understand the core file generated: its something like show in below... (0 Replies)
Discussion started by: vivek.gkp
0 Replies

7. Programming

concat const char * with char *

hello everybody! i have aproblem! i dont know how to concatenate const char* with char const char *buffer; char *b; sprintf(b,"result.txt"); strcat(buffer,b); thanx in advance (4 Replies)
Discussion started by: nicos
4 Replies

8. Programming

error: invalid conversion from ‘const char*’ to ‘char*’

Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially): xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’: xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’ The same error with all c++ constructors - gcc 4.4.4. If anyone can throw any light on... (8 Replies)
Discussion started by: GSO
8 Replies

9. Solaris

Cannot resolve PTR record issue

Hi guys, I am currently receiving the following output in /var/log/syslog and is occurring every second leading to /var directory being full after every 2 days. Aug 20 17:32:29 opaldn1 sendmail: r7KCOlQm002517: ruleset=check_rcpt, arg1=<postmaster@silverapp6>, relay=, reject=450 4.4.0... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies

10. Programming

Invalid conversion from char* to char

Pointers are seeming to get the best of me and I get that error in my program. Here is the code #include <stdio.h> #include <stdlib.h> #include <string.h> #define REPORTHEADING1 " Employee Pay Hours Gross Tax Net\n" #define REPORTHEADING2 " Name ... (1 Reply)
Discussion started by: Plum
1 Replies
ApplicationShell(3X)													      ApplicationShell(3X)

NAME
ApplicationShell - The ApplicationShell widget class SYNOPSIS
#include <Xm/Xm.h> #include <X11/Shell.h> DESCRIPTION
ApplicationShell is used as the main top-level window for an application. An application should have more than one ApplicationShell only if it implements multiple logical applications. Classes ApplicationShell inherits behavior and resources from Core, Composite, Shell, WMShell, VendorShell, and TopLevelShell. The class pointer is applicationShellWidgetClass. The class name is ApplicationShell. New Resources The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A). ApplicationShell Resource Set Class: XmCArgc Default: 0 Type: int Access: CSG Class: XmCArgv Default: NULL Type: String * Access: CSG Specifies the number of arguments given in the XmNargv resource. The function XtInitialize sets this resource on the shell widget instance it creates by using its parameters as the values. Specifies the argument list required by a session manager to restart the application, if it is killed. This list should be updated at appropriate points by the application if a new state has been reached which can be directly restarted. The function XtInitialize sets this resource on the shell widget instance it creates by using its parameters as the values. Inherited Resources ApplicationShell inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the manual page for that superclass. TopLevelShell Resource Set Class: XmCIconic Default: False Type: Boolean Access: CSG Class: XmCIconName Default: NULL Type: String Access: CSG Class: XmCIconNameEn- coding Default: dynamic Type: Atom Access: CSG VendorShell Resource Set Class: XmCAudibleWarning Default: XmBELL Type: unsigned char Access: CSG Class: XmCButtonFontList Default: dynamic Type: XmFontList Access: CSG Class: XmCDefaultFontList Default: dynamic Type: XmFontList Access: CG Class: XmCDeleteResponse Default: XmDESTROY Type: unsigned char Access: CSG Class: XmCInputMethod Default: NULL Type: String Access: CSG Class: XmCKeyboardFocusPolicy Default: XmEXPLICIT Type: unsigned char Access: CSG Class: XmCLabelFontList Default: dynamic Type: XmFontList Access: CSG Class: XmCMwmDecorations Default: -1 Type: int Access: CSG Class: XmCMwmFunctions Default: -1 Type: int Access: CSG Class: XmCMwmInputMode Default: -1 Type: int Access: CSG Class: XmCMwmMenu Default: NULL Type: String Access: CSG Class: XmCPreeditType Default: dynamic Type: String Access: CSG Class: XmC- ShellUnitType Default: XmPIXELS Type: unsigned char Access: CSG Class: XmCTextFontList Default: dynamic Type: XmFontList Access: CSG Class: XmCUseAsyncGeometry Default: False Type: Boolean Access: CSG WMShell Resource Set Class: XmCBaseHeight Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCBaseWidth Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCHeightInc Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCIconMask Default: NULL Type: Pixmap Access: CSG Class: XmCIconPixmap Default: NULL Type: Pixmap Access: CSG Class: XmCIconWindow Default: NULL Type: Window Access: CSG Class: XmCIconX Default: -1 Type: int Access: CSG Class: XmCIconY Default: -1 Type: int Access: CSG Class: XmCInitialState Default: Nor- malState Type: int Access: CSG Class: XmCInput Default: True Type: Boolean Access: CSG Class: XmCMaxAspectX Default: XtUnspecified- ShellInt Type: int Access: CSG Class: XmCMaxAspectY Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMaxHeight Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMaxWidth Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMinAspectX Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMinAspectY Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMinHeight Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCMinWidth Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCTitle Default: dynamic Type: String Access: CSG Class: XmCTitleEncoding Default: dynamic Type: Atom Access: CSG Class: XmCTran- sient Default: False Type: Boolean Access: CSG Class: XmCWaitForWm Default: True Type: Boolean Access: CSG Class: XmCWidthInc Default: XtUnspecifiedShellInt Type: int Access: CSG Class: XmCWindowGroup Default: dynamic Type: Window Access: CSG Class: XmCWinGravity Default: dynamic Type: int Access: CSG Class: XmCWmTimeout Default: 5000 ms Type: int Access: CSG Shell Resource Set Class: XmCAllowShellResize Default: False Type: Boolean Access: CG Class: XmCCreatePopupChildProc Default: NULL Type: XtCreatePopupChild- Proc Access: CSG Class: XmCGeometry Default: NULL Type: String Access: CSG Class: XmCOverrideRedirect Default: False Type: Boolean Access: CSG Class: XmCCallback Default: NULL Type: XtCallbackList Access: C Class: XmCCallback Default: NULL Type: XtCallbackList Access: C Class: XmCSaveUnder Default: False Type: Boolean Access: CSG Class: XmCVisual Default: CopyFromParent Type: Visual * Access: CSG Composite Resource Set Class: XmCReadOnly Default: NULL Type: WidgetList Access: G Class: XmCInsertPosition Default: NULL Type: XtOrderProc Access: CSG Class: XmCReadOnly Default: 0 Type: Cardinal Access: G Core Resource Set Class: XmCAccelerators Default: dynamic Type: XtAccelerators Access: CSG Class: XmCSensitive Default: dynamic Type: Boolean Access: G Class: XmCBackground Default: dynamic Type: Pixel Access: CSG Class: XmCPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG Class: XmCBorderColor Default: XtDefaultForeground Type: Pixel Access: CSG Class: XmCPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG Class: XmCBorderWidth Default: 1 Type: Dimension Access: CSG Class: XmCColormap Default: dynamic Type: Colormap Access: CG Class: XmCDepth Default: dynamic Type: int Access: CG Class: XmCCallback Default: NULL Type: XtCallbackList Access: C Class: XmCHeight Default: dynamic Type: Dimension Access: CSG Class: XmCInitialResourcesPersistent Default: True Type: Boolean Access: C Class: XmCMapped- WhenManaged Default: True Type: Boolean Access: CSG Class: XmCScreen Default: dynamic Type: Screen * Access: CG Class: XmCSensitive Default: True Type: Boolean Access: CSG Class: XmCTranslations Default: dynamic Type: XtTranslations Access: CSG Class: XmCWidth Default: dynamic Type: Dimension Access: CSG Class: XmCPosition Default: 0 Type: Position Access: CSG Class: XmCPosition Default: 0 Type: Posi- tion Access: CSG Translations There are no translations for ApplicationShell. SEE ALSO
Composite(3X), Core(3X), Shell(3X), WMShell(3X), VendorShell(3X), TopLevelShell(3X) ApplicationShell(3X)
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy