references

Getting my conceptions about pointers and references straight (C++)

Hi guys I've been programming a while now at school, and I'm working on my first independent large project. I've been discovering a lot of things about programming that I haven't known before and it's been great. However, more and more, I feel like I no longer understand C++ as a language the more I delve into it. I'd like to get some ...

Forcing a (generic) value type to be a reference

I have a struct with some fields. One of the fields is of a generic type. The generic type could be either a reference type or a value type. I want to force that it is stored as a reference internally, to avoid that the struct gets too large. struct Foo<T> { T field; // should be a reference } I know I could use object or T[], but...

webapp find image references .jsp files

There is 1000 images in web application, some of them are used and after time some of them are not being used but they are present in images folder. i want to search images which are not being referenced in my .jsp files i don't want to search 1 by 1 and finding their references into .jsp files, any utility which search all images at on...

Setting up references to registration-free (isolated) COM DLLs in VC++

I have two VC++ projects: ProjectB which depends on ProjectA. I would like ProjectB to access ProjectA through ProjectA's COM interface only. I added a reference in ProjectB's "Framework and References" property dialog which creates an Interop DLL. How do I set up this reference to be in isolation mode? Do I need to make any modificatio...

What happens in C++ if you pass an anonymous object into a function that takes a reference?

IE what happens if you have this following piece of code? int mean(const vector<int> & data) { int res = 0; for(size_t i = 0; i< data.size(); i++) { res += data[i]; } return res/data.size(); } vector<int> makeRandomData() { vector<int> stuff; int numInts = rand()%100; for(int i = 0; i< numInts; i++) { stuff.push_b...

C# Deep Copying Tree Structures with BinaryFormatter

EDIT 1 Kent has alleviated my fears. However, I've found one exception to the rule. I wrote a method for the Node class that would traverse up through the hierarchy until it got to the root Node and return its hash code. The hash code's the same all the way down the line except for one single object. In a word, RAGE. I'm at the end o...

Is it possible to create a reference-cycle using only value-types?

By way of explanation, take this value type in C#: struct ObjRef { public object Value; public ObjRef(object value) { Value = value; } } I can imagine an object graph where there are two boxed instances of this type, each holding a reference to the other. This is what I mean by a reference-cycle with only value-types. My ques...

Visual studio assembly references

Is there anyway to localise an external assembly reference? Here's my situation: I am working on Project A and it contains assembly references from Project B. Now when I release this Project to my client I don't want to have to include the whole of Project B with it. Is there anyway to force it to copy the dll's from Project B onto Proj...

Referencing a pointer in a C++ member function.

Hi, I'm writing a member function that uses a member variable pointer as an iterator. However I want to reference the pointer within the function purely for readability's sake. Like so: /* getNext will return a pos object each time it is called for each node * in the tree. If all nodes have been returned it will return a Pos * objec...

Why would all of my references have yellow exclamation points on them in my .NET class library?

I've been developing a class library for quite sometime and all of the sudden, sometime last week, I opened my project and all of my references have yellow exclamation points on them now (System.dll, System.Drawing.dll, etc..). I've tried removing the references and re-adding them to fix any broken reference paths, but they continue to s...

Returning a reference array from a const member function

How do I return an array reference from a const member function? class State{ Chips (&arr() const)[6][7] { return arr_; } Chips val() const { return val_; } } Invalid initialization of reference of type 'Chips (&)[6][7]' from expression of type 'const Chips [6][7]' Thank you. ...

can anyone work out why my app is crashing when i move the slider

When i move the slider it crashes the app. i know it is something to do with the argument i am passing to maxProcess method. it works fine if i take this out. but i need it to update the newEvent objects instance variable. Any ideas. This is what i have been told in another forum but i don;t know how to do this "this code declares a new...

Visual Studio 2008 project using incorrect version of binary reference from other project

Hi, I have a VS208 solution with several projects in it. The main WinForms client project has a project reference to a library project within the solution. The library project has three binary references to the Office 2003 interop assemblies v11. These binary references have their Specific Version property set and when I build the li...

Race conditions with java references

Hi, The atomic integer, long, boolean etc are used to do any atomic updates to the respective types since there may be a race condition when we execute any manipulation on them, e.g ++. But what are the different cases with references where there may be such race conditions? Best Regards, Keshav ...

Browser object references for Chrome, Safari or Opera?

I was able to find the browser object references for Firefox and IE... Firefox: https://developer.mozilla.org/en/Gecko_DOM_Reference IE: http://msdn.microsoft.com/en-us/library/ms533054(VS.85).aspx But, I am unable to find the object references for the other popular browsers. I assume that Safari and Chrome have a similar object struc...

Confusion over C++ pointer and reference topic

What is the difference between the following parameter passing mechanisms in C++? void foo(int &x) void foo(int *x) void foo(int **x) void foo(int *&x) I'd like to know in which case the parameter is being passed by value or passed by reference. ...

Sharing projects in multiple solutions fails because of project references in VS2010

We have a lot of native C++ static libs and DLL's that make up our application. In VS2010 it is possible to use references for native C++ projects between the dependend projects to force the correct build order. We used to do this with project dependencies but they were stored at the solution level. We do not share solutions, only the p...

Unsetting variable at reference in php

I have a class which contains an array of objects and has methods to return an object from that array by reference. There is also a method to unset an object from the array. However if I have a variable that references an object from the array, and that element is unset, the variable still has a reference to it. What do I need to do in ...

Problem with references to pointers

Why this can't compile: // RefToPointers.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using std::cout; class T { public: T(int* value):data_(value) { } int* data_; int* getData_() { return data_; } int getValue()//<----------Here I do n...

Add Reference VS 2008 strange issue with paths

I have VS 2008 Team Suite, and use TFS. I have references in 2 folders in TFS: path in TFS: $Arquitectura\Main\ReferenciasFrk\Release\ mapped to: C:\Trabajo\Arquitectura\Main\ReferenciasFrk\Release\ path in TFS: $Arquitectura\Main\Referencias Externas\ mapped to: C:\Trabajo\Arquitectura\Main\Referencias Externas\ I have project cspr...