10 More Discussions You Might Find Interesting
1. Programming
Hi,
Can anyone tell me why the following program is giving compiler error when I use a friend function of a class as the comparison predicate for the third parameter of std::sort() algorithm? How to correct it, keep the 'friend' intact?
#include <iostream>
#include <vector>
#include <list>... (1 Reply)
Discussion started by: royalibrahim
1 Replies
2. Programming
I am getting a dereferencing pointer to incomplete type error when i compile the following code on lines highlighted in red. Can anyone help me in identifying what is wrong in the code?
#include<stdio.h>
#include<stdlib.h>
typedef struct{
int info;
struct node* link ;
} node;
void... (3 Replies)
Discussion started by: sreeharshasn
3 Replies
3. Shell Programming and Scripting
Below part of script, is working fine sometimes and gives error sometime.
I am doing float operations, checking if x > y.
##########CODE##########
THRESHOLD="1.25"
ratio=$( echo "scale=2; ${prev}/${current}" | bc )
if ; then
split_date=`echo ${line} | cut -d, -f2`
fi ... (9 Replies)
Discussion started by: manishma71
9 Replies
4. Shell Programming and Scripting
Hi ,
I want to write a shell script that can create oracle database user and grants permission to this user.
Thanks & Regards,
Deepak (4 Replies)
Discussion started by: Deepakjha
4 Replies
5. UNIX for Dummies Questions & Answers
I'm getting the following Error:
prepare_pcap.c: In function `prepare_pkts':
prepare_pcap.c:127: error: dereferencing pointer to incomplete type
prepare_pcap.c:138: error: dereferencing pointer to incomplete type
====================================
This is the part of the relevant... (8 Replies)
Discussion started by: katwala
8 Replies
6. Programming
If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it:
(1) one is to pass a pointer-to-pointer parameter, like:
int my_malloc(int size, char **pmem)
{
*pmem=(char *)malloc(size);
if(*pmem==NULL)... (11 Replies)
Discussion started by: aaronwong
11 Replies
7. UNIX for Advanced & Expert Users
Hi All,
i have an small issue...
echo " "
eval x=$@
export x=`echo $x`
echo $x
ssh user@ipadrss; cd /mbbv/home/;
cd /mbbv/home/orange/orange/
echo pwd
bash samplescript.sh $x
above is my script which will triger from server A and will connect to server B for some... (2 Replies)
Discussion started by: Shahul
2 Replies
8. Shell Programming and Scripting
Hi,
I use the following command
make all > output-`date +%F-%H-%M-%S`.txt 2>&1
to invoke a MAKE process that takes some weeks to complete. The ouput is redirected to a text file. Now I prefix the above command with time to get time needed for completion of the MAKE process
time make... (2 Replies)
Discussion started by: gkamendje
2 Replies
9. Programming
Hello all
Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting
The fallowing error :
Undefined first referenced
symbol in file
std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies
10. Shell Programming and Scripting
Hi
I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this.
Thanks (2 Replies)
Discussion started by: 0ktalmagik
2 Replies
std::unique_ptr< _Tp, _Dp >(3cxx) std::unique_ptr< _Tp, _Dp >(3cxx)
NAME
std::unique_ptr< _Tp, _Dp > -
SYNOPSIS
Public Types
typedef _Dp deleter_type
typedef _Tp element_type
typedef _Pointer::type pointer
Public Member Functions
unique_ptr (pointer __p)
unique_ptr (pointer __p, typename std::conditional< std::is_reference< deleter_type >::value, deleter_type, const deleter_type & >::type
__d)
unique_ptr (pointer __p, typename std::remove_reference< deleter_type >::type &&__d)
constexpr unique_ptr (nullptr_t)
unique_ptr (unique_ptr &&__u)
template<typename _Up , typename _Ep , typename = typename std::enable_if <std::is_convertible<typename unique_ptr<_Up,
_Ep>::pointer, pointer>::value && !std::is_array<_Up>::value &&
((std::is_reference<_Dp>::value && std::is_same<_Ep, _Dp>::value) || (!std::is_reference<_Dp>::value &&
std::is_convertible<_Ep, _Dp>::value))> ::type> unique_ptr (unique_ptr< _Up, _Ep > &&__u)
unique_ptr (const unique_ptr &)
pointer get () const
deleter_type & get_deleter ()
const deleter_type & get_deleter () const
operator bool () const
std::add_lvalue_reference
< element_type >::type operator* () const "
pointer operator-> () const
unique_ptr & operator= (unique_ptr &&__u)
template<typename _Up , typename _Ep , typename = typename std::enable_if <std::is_convertible<typename unique_ptr<_Up,
_Ep>::pointer, pointer>::value && !std::is_array<_Up>::value>::type> unique_ptr & operator= (unique_ptr<
_Up, _Ep > &&__u)
unique_ptr & operator= (nullptr_t)
unique_ptr & operator= (const unique_ptr &)
pointer release ()
void reset (pointer __p=pointer())
void swap (unique_ptr &__u)
Detailed Description
template<typename _Tp, typename _Dp = default_delete<_Tp>>class std::unique_ptr< _Tp, _Dp >
20.7.12.2 unique_ptr for single objects.
Definition at line 88 of file unique_ptr.h.
Author
Generated automatically by Doxygen for libstdc++ from the source code.
libstdc++ Tue Nov 27 2012 std::unique_ptr< _Tp, _Dp >(3cxx)