Search Results

Search found 7 results on 1 pages for 'q0987'.

Page 1/1 | 1 

  • How to access shared folder between CentOS 6 and WinXP under vmware player 4

    - by q0987
    Based on Sharing Files between CentOS 6 and Windows Systems with Samba I am able to follow until section of "Accessing Samba Shares". however, my system is WinXP and I don't see CentOS 6 icon at all. In my left panel of explorer, I only see "My network places". For section "Accessing Windows Shares from CentOS 6", after I click workgroup, I only see a localhost icon. When I click this icon, I see "unable to mount location" error from CentOS. BTW: I have set the shared folder within WMWare Player 6.0. Whatelse I have to do in order to make the shared folder work? Thank you

    Read the article

  • photoshop - How to show the cursor coordinate in selection and dropper

    - by q0987
    I am using Adobe Photoshop CS4 to edit a picture. The problems I have are that I don't know where I can see the mouse cursor coordinate while I move my mouse. Q1 For example, in Paint.Net, whenever I move mouse cursor, I can immediately see the feedback from bottom-right corner (x, y), how can I see such info in photoshop while I use eyedropper function? Q2 For example, when in crop mode, I drag-drop a rectangle but I cannot see the size of the created region of interest? Thank you

    Read the article

  • Why the Utilities button of Virtual Machine Settings/Hardware/Hard Disk(IDE) is disabled?

    - by q0987
    I am using ubuntu 11.04 virtual image with VMWare Player 4.0.2 build-591240. Because I found that the folder that holds the VMWare image goes to 8GB and want to shrink the size by using the utilities tool provided by the VMWare Image Player. However, I found that the button is disabled like this. Question How to enable the button so that I can use it to shrink the size of virtual image used by ubuntu? Question If I cannot enable the button, is there another way that I can shrink the size of used space? Thank you

    Read the article

  • C++ -- Is there an implicit cast here from Fred* to auto_ptr<Fred>?

    - by q0987
    Hello all, I saw the following code, #include <new> #include <memory> using namespace std; class Fred; // Forward declaration typedef auto_ptr<Fred> FredPtr; class Fred { public: static FredPtr create(int i) { return new Fred(i); // Is there an implicit casting here? If not, how can we return // a Fred* with return value as FredPtr? } private: Fred(int i=10) : i_(i) { } Fred(const Fred& x) : i_(x.i_) { } int i_; }; Please see the question listed in function create. Thank you // Updated based on comments Yes, the code cannot pass the VC8.0 error C2664: 'std::auto_ptr<_Ty::auto_ptr(std::auto_ptr<_Ty &) throw()' : cannot convert parameter 1 from 'Fred *' to 'std::auto_ptr<_Ty &' The code was copied from the C++ FAQ 12.15. However, after making the following changes, replace return new Fred(i); with return auto_ptr<Fred>(new Fred(i)); This code can pass the VC8.0 compiler. But I am not sure whether or not this is a correct fix.

    Read the article

  • C++ -- How can we call "delete this; " in a const-member function?

    - by q0987
    Hello all, I saw the code snippet as follows: class UPNumber { public: UPNumber(); UPNumber(int initValue); ... // pseudo-destructor (a const member function, because // even const objects may be destroyed) void destroy() const { delete this; } // why this line is correct??? ... private: ~UPNumber(); }; First, I am sure that above class definition is correct. Here is my question, why we can define the function 'destroy' as above? The reason being asking is that why we can modify 'this' in a const-member function? Thank you

    Read the article

  • C++ -- Why should we use operator -> to access member functions of a SmartPtr?

    - by q0987
    Hello all, The question is given in the last two lines of code. template<class T> // template class for smart class SmartPtr { // pointers-to-T objects public: SmartPtr(T* realPtr = 0); T* operator->() const; T& operator*() const; T* Detach( void ) { T* pData = pointee; pointee = NULL; return pData; } private: T *pointee; ... }; class TestClass {} SmartPtr<TestClass> sPtr(new TestClass); TestClass* ptrA = sPtr->Detach(); // why I always see people use this method to access member functions of a Smart pointer. We can use sPtr-> b/c we have defined operator->() in SmartPtr. TestClass* ptrB = sPtr.Detach(); // Question: Is this a valid C++ way? If not, why? Thank you

    Read the article

  • Should we use p(..) or (*p)(..) when p is a function pointer?

    - by q0987
    Reference: [33.11] Can I convert a pointer-to-function to a void*? #include "stdafx.h" #include <iostream> int f(char x, int y) { return x; } int g(char x, int y) { return y; } typedef int(*FunctPtr)(char,int); int callit(FunctPtr p, char x, int y) // original { return p(x, y); } int callitB(FunctPtr p, char x, int y) // updated { return (*p)(x, y); } int _tmain(int argc, _TCHAR* argv[]) { FunctPtr p = g; // original std::cout << p('c', 'a') << std::endl; FunctPtr pB = &g; // updated std::cout << (*pB)('c', 'a') << std::endl; return 0; } Question Which way, the original or updated, is the recommended method? Thank you Although I do see the following usage in the original post: void baz() { FredMemFn p = &Fred::f; ? declare a member-function pointer ... }

    Read the article

1