Sponsored Content
Top Forums Programming Concatenating Struct Value With Char In C Post 302974388 by Azrael on Monday 30th of May 2016 02:22:16 AM
Old 05-30-2016
Yep, I was not interested in "." or "..", but was just trying to focus on one problem at a time. That worked!

Code:
/proc/21480/fd/0
/proc/21480/fd/1
/proc/21480/fd/2
/proc/21480/fd/3
/proc/21480/fd/4
/proc/21480/fd/5
/proc/21480/fd/6
/proc/21480/fd/7
/proc/21480/fd/8
/proc/21480/fd/9
/proc/21480/fd/10
/proc/21480/fd/11
/proc/21480/fd/12
/proc/21480/fd/13
/proc/21480/fd/14
/proc/21480/fd/15
/proc/21480/fd/16

Much appreciated Don Cragun. I've been trying to get back into C after a long break from it. I will definitely re-read all the suggestions you've made. Thanks again!
 

10 More Discussions You Might Find Interesting

1. Programming

save a struct

hi all , can i save a structure in c in a file? how ? help me , thx. :) (2 Replies)
Discussion started by: kall_ANSI
2 Replies

2. Programming

struct tm problem

I receive an integer as argument for a function. within function definition i want it to be of type struct tm. eg.. main() { int a; ...... } function(...,..,a,..) int a; { struct tm tm; if(!a) ^ time(&a); ^ ... (4 Replies)
Discussion started by: bankpro
4 Replies

3. Shell Programming and Scripting

How to replace any char with newline char.

Hi, How to replace any character in a file with a newline character using sed .. Ex: To replace ',' with newline Input: abcd,efgh,ijkl,mnop Output: abcd efgh ijkl mnop Thnx in advance. Regards, Sasidhar (5 Replies)
Discussion started by: mightysam
5 Replies

4. 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

5. 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

6. UNIX for Dummies Questions & Answers

How to access a struct within a struct?

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)
Discussion started by: unbelievable21
1 Replies

7. Programming

help with struct command in C

in C i am using this code to get the c time or a time or m time struct dirent *dir; struct stat my; stat(what, &my); thetime = my.st_ctime; How can i check if i have permission to check the c time of the file? (1 Reply)
Discussion started by: omega666
1 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. Programming

Storing C++-struct in file - problem when adding new item in struct

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)
Discussion started by: Powerponken
2 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
Tcl_CreateCloseHandler(3)                                     Tcl Library Procedures                                     Tcl_CreateCloseHandler(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler - arrange for callbacks when channels are closed SYNOPSIS
#include <tcl.h> void Tcl_CreateCloseHandler(channel, proc, clientData) void Tcl_DeleteCloseHandler(channel, proc, clientData) ARGUMENTS
Tcl_Channel channel (in) The channel for which to create or delete a close callback. Tcl_CloseProc *proc (in) The procedure to call as the callback. ClientData clientData (in) Arbitrary one-word value to pass to proc. _________________________________________________________________ DESCRIPTION
Tcl_CreateCloseHandler arranges for proc to be called when channel is closed with Tcl_Close or Tcl_UnregisterChannel, or using the Tcl close command. Proc should match the following prototype: typedef void Tcl_CloseProc( ClientData clientData); The clientData is the same as the value provided in the call to Tcl_CreateCloseHandler. Tcl_DeleteCloseHandler removes a close callback for channel. The proc and clientData identify which close callback to remove; Tcl_Delete- CloseHandler does nothing if its proc and clientData arguments do not match the proc and clientData for a close handler for channel. SEE ALSO
close(n), Tcl_Close(3), Tcl_UnregisterChannel(3) KEYWORDS
callback, channel closing Tcl 7.5 Tcl_CreateCloseHandler(3)
All times are GMT -4. The time now is 07:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy