Sponsored Content
Top Forums Programming Passing Pointers by reference in C++ Problem Post 302551428 by yazu on Tuesday 30th of August 2011 10:33:08 AM
Old 08-30-2011
This is a C++ warning about using C, and you will get a lot of them if you will write in a such manner. Don't mix C and C++ styles, idioms and constructs. Either use <stdio.h>, malloc, printf, char*, etc. (so C) or use string, cout, iostream, new, etc. (C++).

===

Ok, I was wrong. But it's a bad style anyway, IMO.

Last edited by yazu; 08-30-2011 at 11:50 AM..
 

10 More Discussions You Might Find Interesting

1. Programming

Problem with pointers, structures, and Pthread

Hello all, I'm working on a small wrapper library for a bigger project, and i've been killing my self over (what I think is) a pointer problem. Here is the code (I extracted the part of the code where the problem is for better reading, I tested the code below, and I get the same problem):... (13 Replies)
Discussion started by: tmp0
13 Replies

2. Programming

Need a simple example of passing FILE pointers

Dear friends, can anybody pls tell me how to pass FILE pointer in c. I am so confused .. :confused: suppose I ve two function 1. file_open() 2. read_line() I want to call these function from main() function and in file_open() function it will open that file and in read_line()... (5 Replies)
Discussion started by: user_prady
5 Replies

3. Programming

Problem with array of pointers

Hi All, I am using the array of pointers and storing the address of string.This is a global list. So i am using extern to give the reference of this list to another file and using reading the data from this string. But list is being corrupted and string is missing some characters in... (2 Replies)
Discussion started by: lovevijay03
2 Replies

4. Shell Programming and Scripting

Array reference problem

i have a variable MYHOST that has my host name.depending on the host i have an array like A_<hostname>.Everytime i need to append the hostname to A_ to get the array.but in the shell script i am nt able to access the members of that array. code of what i hav done: export temp=A_$MYHOST for... (15 Replies)
Discussion started by: niteesh_!7
15 Replies

5. Shell Programming and Scripting

BASH: File name part to list reference problem.

I've made a habit of including a four-letter "tail" on image file names I download from the Web, so I can both match them with IPTC Transmission References of my own making and rename them later using either a GUI renamer or a script I've written myself. Now I want to automate the process of... (2 Replies)
Discussion started by: SilversleevesX
2 Replies

6. Programming

Problem With Pointers

Hi guys. What is the difference between these: 1. int *a; 2. int (*a); (2 Replies)
Discussion started by: majid.merkava
2 Replies

7. Shell Programming and Scripting

Replace character based on reference file problem asking

I got two files right now, input file (target file), reference file 1 (query file) reference file 1 (long list of data) KOLOPWMOPOPO ADASDASD ADSASDASDAD . . target file (one long liner content) ADASDASDTYUKOKOLOPWMOPOPOOPLUAADSASDASDADPOPOUYADADASDASD desired output file content ... (1 Reply)
Discussion started by: patrick87
1 Replies

8. Homework & Coursework Questions

Passing pointers to struct

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)
Discussion started by: ignatius3
2 Replies

9. Programming

Passing by reference question

Hello All, I have a question in the following sample code: If I am passing a reference of a variable, will the dynamic allocation happen in which it is passed? Will the dynamic allocation will actually change the memory contents of char array "arr"? int main() { char *arr; ... (1 Reply)
Discussion started by: mind@work
1 Replies

10. Shell Programming and Scripting

Shell Scripting Problem - Invalid Back Reference

Here is the question... Create a new script, sub2, taking three parameters... 1.) the string to be replaced 2.) the string with which to replace it 3.) the name of the file in which to make the substitution ...that treats the string to be replaced as plain text instead of as a regular... (1 Reply)
Discussion started by: johnhisenburg
1 Replies
diagmond(1M)															      diagmond(1M)

NAME
diagmond - Support Tools Manager daemon SYNOPSIS
/usr/sbin/stm/uut/bin/sys/diagmond DESCRIPTION
The Support Tools Manager (STM) provides three interfaces that allow a user access to an underlying toolset, consisting of information mod- ules, firmware update tools, verifiers, diagnostics, exercisers, expert tools, and utilities. STM uses a monitor ( diagmond ) to manage launching and controlling tools as well as remote file system accesses. Diagmond keeps track of the system hardware configuration which includes the list of tools available for each device. It also keeps track of which tools are currently executing or have been executed on each device. Application Usage This daemon will be deprecated on new server models. Please use System Management Homepage (see hpsmh(1M)). OTHER FILES
/var/stm/logs/sys/activity_log - Activity log of diagmond /var/stm/logs/sys/scan_hw_log - Log of last scan of hardware /var/stm/config/sys/diagmond.cfg - Diagmond configuration /var/stm/data/id_mod_xref - Identify routine cross reference /var/stm/data/prod_op_xref - Tools cross reference file /var/stm/data/util_list - List of utilities installed /var/stm/data/daemon_list - List of daemons installed /var/stm/data/uut_status - Hardware configuration and status /var/stm/data/key_file - OS resource key file COPYRIGHT
(c) Copyright 1995, Hewlett-Packard Company ORIGIN
diagmond was developed by Hewlett-Packard Company. diagmond(1M)
All times are GMT -4. The time now is 12:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy