I have a structure:
struct mystruct
{
int* pointer;
};
structure mystruct* struct_inst;
Now I want to change the value pointed to by struct_inst->pointer. How can I do that?
hello.
I implemented reference counting pointers (called SP in the example) and im having problems with polymorphism which i think i shouldn't have.
In the following code:
SP<BaseClass> foo()
{
// Some logic...
SP<DerivedClass> retPtr = new DerivedClass();
return retPtr;
}
DerivedClass inherits…
Is it possible to detect with VSX when any (or a particular) smart tag event is happening? I mean, every time we rename a variable, for example, a smart tag is available that allows us to change it through a form. I'd like to know if I can access that "text is changing" event.
I don't mean to have to check for myself if the text is being changed…
i have 3 classes A,B and C. C is derived from A and B. i get pointer to pointer of class C and cast to A** , and B ** , the variable that hold the the B** has the address of A** in my example B ** BdoublePtr hold the address of A** .i am using the following code
#include "conio.h"
#include "stdio.h"
#include "string.h"
class A{
public:
A()
…
I am having a pointer to the common static method
class MyClass
{
private:
static double ( *pfunction ) ( const Object *, const Object *);
...
};
pointing to the static method
class SomeClass
{
public:
static double getA ( const Object *o1, const Object *o2);
...
};
Initialization:
double ( *MyClass::pfunction ) (…
I'm trying to set a linked list head through pointer to a pointer. I can see inside the function that the address of the head pointer is changing but as i return to the main progran it becomes NULL again. can someone tell me what I'm doing wrong ??
#include <stdio.h>
#include <stdlib.h>
typedef…
I want to change INT to INTERNATIONAL and NA to NATIONAL ASSEMBLY in whole excel workbook through an excel Macro or Find and Replace dialogue box. But when I run the macro or change it through Find and Replace dialogue box it also replace NA from CHINA last 2 characters and it became CHINATIONAL ASSEMBLY and INTERIOR to INTERNATIONALERIOR.
…
I'm using the "Disks" program in Ubuntu 14.04 (live DVD) to assess the health of a drive I suspect is failing. However, when I first opened the program, it showed that the overall health was OK and all assessments are OK as well. I then tried to run a short self-test, but now the overall assessment shows a red "SELF-TEST FAILED". In the…
I've been using ActiveSmart to monitor my hard-drives health for a few weeks now, and its telling me my brand new 1.5 TB hard-drive is half-dead already. About on-par with one of my hard-drives which I know is at least half dead because I've been having some read errors and heard ticking noises. Now I haven't actually noticed any…
I have on my hard drive 2 OSes: Ubuntu 12.04 and Windows Vista (I keep it just because of school). Everything was OK on both OSes, but one day on Ubuntu I was getting awkward noises from my notebooks' hard drive and then everything stopped and I couldn't do anything. On Windows everything was OK.
Every time I boot Ubuntu I can…
Sorry if this question has been asked before. On my search through SO I didn't find one that asked what I wanted to know.
Basically, when I have this:
typedef struct node
{
int data;
node *node;
} *head;
and do node *newItem = new node;
I am under the impression that I am declaring and reserving space, but not…
Hello , I am trying some programs in c face a problem with this program
#include<stdio.h>
int main()
{
int a=9,*x;
float b=3.6,*y;
char c='a',*z;
printf("the value is %d\n",a);
printf("the value is %f\n",b);
printf("the value is %c\n",c);
x=&a;
y=&b;
z=&c;
printf("%u\n",a);
printf("%u\n",b);
…
At our company one of the core C++ classes (Database connection pointer) is implemented as a reference counting pointer. To be clear, the objects are NOT DB connections themselves, but pointers to a DB connection object.
The library is very old, and nobody who designed is around anymore.
So far, nether I, nor any C++…
input
23 3 4 4 42 n 23 0 9 9 n n n 3 9 9 x
//according to input,i should create int pointer arrays. pointer arrays
// starting from 1 (that is initial arrays is arrays[1].when program sees n ,it
// must be jumb to arrays 2
// the first int input 23 is num_arrays which used in…
input
23 3 4 4 42 n 23 0 9 9 n n n 3 9 9 x
//according to input,i should create int pointer arrays. pointer arrays
// starting from 1 (that is initial arrays is arrays[1].when program sees n ,it
// must be jumb to arrays 2
// the first int input 23 is num_arrays which…
Heyy Everybody!
I am trying to create a memory management system, so that a user can call myMalloc, a method I created. I have a linked list keeping track of my free memory. My problem is when I am attempting to find the end of a free bit in my linked list. I am attempting to add the size of the…
I need to do a simple thing, which I used to do many times in Java, but I'm stuck in C (pure C, not C++). The situation looks like this:
int *a;
void initArray( int *arr )
{
arr = malloc( sizeof( int ) * SIZE );
}
int main()
{
initArray( a );
// a is NULL here! what to do?!
…
I’ve just discovered a new, somewhat hidden, feature in SSDT that I didn’t know about and figured it would be worth highlighting here because I’ll bet not many others know it either; the feature is called Smart Defaults. It gets around the problem of adding a NOT NULLable column to an existing…
Get smart about E-Business Suite Release 12 implementation with this customer success story. Hear Mike Battistel, VP Information Systems – SMART Technologies, discuss why they selected E-Business Suite Release 12, the implementation process, what benefits they have gained and lessons learned…
I’ve just discovered a new, somewhat hidden, feature in SSDT that I didn’t know about and figured it would be worth highlighting here because I’ll bet not many others know it either; the feature is called Smart Defaults. It gets around the problem of adding a NOT NULLable column to an…
Netinium® NCC is the operator console for the Netinium® AMM+ platform, a Head End system for multi-vendor smart meter and smart grid infrastructures.
The role based NCC provides a uniform operations environment for grid operators and utilities to securely manage millions of smart…
We are planning to develop a game for Samsung Smart TVs. Although those TVs support Flash and HTML5 other specs fail at supporting a game engine.
For ex: Using an engine that needs GPU is not possible with the default Samsung smart tv set.
Or...
WebGL is supported with Samsung SDK…
I've just written a piece of code to display a UIActionSheet within my app. Whilst looking at the code to initialise my UIActionSheet something struck me as a little strange. The initialisation function has the following signature...
initWithTitle:(NSString *)title delegate:(id…
Code snippet (normal pointer)
int *pi = new int;
int i = 90;
pi = &i;
int k = *pi + 10;
cout<<k<<endl;
delete pi;
[Output: 100]
Code snippet (auto pointer)
Case 1:
std::auto_ptr<int> pi(new int);
int i = 90;
pi = &i;
int k = *pi + 10; //Throws…