Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 561 results for
dereferencing
- Page 1
Re: dereferencing operators
Programming
Software Development
14 Years Ago
by ArkM
… Dragon;855416]There is no such concept as "
dereferencing
and operator". Operators are like <, >, …<=, /, +, etc. You probably mean
dereferencing
a pointer. [code] int n = 123; int* p = …Standard Draft where [icode]operator*()[/icode] named [i]
dereferencing
operator[/i]. However as usually this operator called …
Re: dereferencing operators
Programming
Software Development
14 Years Ago
by Ancient Dragon
There is no such concept as "
dereferencing
and operator". Operators are like <, >, <=, /, +, etc. You probably mean
dereferencing
a pointer. [code] int n = 123; int* p = &n; *p = 0; //
dereferencing
a pointer [/code]
dereferencing operators
Programming
Software Development
14 Years Ago
by nature_love
hey guys.. am learning c++ just started.. am not able to implement member
dereferencing
operators.. i know there basic definations and rules but...its like.. a clear picture is still not coming to my mind..as in how to make use of them.. please explain with examples..
Re: dereferencing operators
Programming
Software Development
14 Years Ago
by siddhant3s
…, meant that he wants to customize the uranary * operator ( the
dereferencing
operator) for is custom class. I don't know why…
Re: dereferencing operators
Programming
Software Development
14 Years Ago
by mvmalderen
…, meant that he wants to customize the uranary * operator ( the
dereferencing
operator) for is custom class. [/QUOTE] He mentions that he…
Re: dereferencing operators
Programming
Software Development
14 Years Ago
by siddhant3s
"implementing the
dereferencing
operator" means overloading it for your class. I though agree, that the OP may not referring to operator overloading. Anyways, in that case, the Dragon has already replied.
Re: dereferencing operators
Programming
Software Development
14 Years Ago
by nature_love
… u please give me some sample programs using above member
dereferencing
operators..i'll be highly obliged.. come on guys.. help…
Dereferencing confusion...
Programming
Software Development
14 Years Ago
by grib
… I missing here? [i]Sorry, my original problem was with
dereferencing
, so the thread title, which I forgot to change, is…
Re: Dereferencing confusion...
Programming
Software Development
14 Years Ago
by grib
…. I began by buzzing off a decent post about a
dereferencing
problem I had, but I then figured it out while…
Problem Passing Ifstream Pointer to Main Function and Dereferencing
Programming
Software Development
11 Years Ago
by dyl_ham
… ifstream pointer to the main function, I'm having trouble
dereferencing
it. #include <iostream> #include <fstream> #include…
Re: dereferencing operators
Programming
Software Development
14 Years Ago
by ArkM
[url]http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=142[/url]
Re: Dereferencing confusion...
Programming
Software Development
14 Years Ago
by Lerner
I still don't understand the question. Please be more specific. I do see that you don't null terminate can->name in putCandy() so technically can->name is a simple char array not a string. Try fixing that and see what happens. If it doesn't fix things then post with a specific question.
Re: Dereferencing confusion...
Programming
Software Development
14 Years Ago
by programmersbook
[CODE] strcpy(can->name, ch );[/CODE] better use std::string.
Re: pointer dereferencing
Programming
Software Development
10 Years Ago
by Ancient Dragon
Post your code, the diagram you posted is not very helpful to find the problem in your program. My guess is that the pointer you used was not initialized to a specific address before
dereferencing
it. For example int k = 123; // original integer int* p = &k; // initialize a pointer int q = *p; // dereference the pointer
Dereferencing vector.begin() not dereferencable...
Programming
Software Development
12 Years Ago
by Jsplinter
[CODE] vector<int> iv; iv.push_back(4); vector<int>::iterator it = iv.begin(); cout << *it; cout << *(iv.begin()); //debug assertion here [/CODE] Why can't I dereference iv.begin() directly?
Re: Dereferencing vector.begin() not dereferencable...
Programming
Software Development
12 Years Ago
by sfuo
I compiled this with Code::Blocks and Visual Studio and both worked just fine.
Re: Dereferencing vector.begin() not dereferencable...
Programming
Software Development
12 Years Ago
by mzimmers
Compiles (and runs) using gcc, too. Here's my entire program, built from your snippet: [CODE]#include "vector" #include "iostream" using namespace std; int main () { vector<int> iv; iv.push_back(4); vector<int>::iterator it = iv.begin(); cout << *it; cout << *(iv.begin()); //debug assertion here…
Re: Dereferencing vector.begin() not dereferencable...
Programming
Software Development
12 Years Ago
by Jsplinter
Hmm, I have no idea why it is causing a problem on my system. It compiles but throws an exception in debug mode. I thought it should certainly work. But The code was cut and pasted and it wasn't working in debug mode of VS2010. I thought I was losing my mind. Glad to know that something else was going on.
Re: Problem Passing Ifstream Pointer to Main Function and Dereferencing
Programming
Software Development
11 Years Ago
by deceptikon
In proper socratic fashion I'll ask you this: what happens to an ifstream object when it goes out of scope?
Re: Problem Passing Ifstream Pointer to Main Function and Dereferencing
Programming
Software Development
11 Years Ago
by dyl_ham
Thanks for the reply. I've declared the ifstream on the heap so it doesn't go out of scope when the function exits. However, I'm still not quite sure how to work with the ifstream when it's returned to the main function. For example, reading the file stream. The program compiles if I exclude the do loop in the main function. ifstream * …
Re: Problem Passing Ifstream Pointer to Main Function and Dereferencing
Programming
Software Development
11 Years Ago
by deceptikon
ifstream doesn't have a copy constructor. Rather, it's declared private prior to C++11 and declared deleted in C++11. Either way, you can't copy stream objects in any generally useful manner, so it's truly awkward to use them as a return value. I was pushing you toward a different solution entirely, specifically using an output parameter: #…
Re: Problem Passing Ifstream Pointer to Main Function and Dereferencing
Programming
Software Development
11 Years Ago
by dyl_ham
Thanks a lot for the reply, deceptikon. I would have found a different way of doing it if it weren't in my professor's explicit instructions. As per his instructions: > ifstream * openInputFile() - Prompt the user for a valid input file name, and return an open file stream connected to the input file. Called as needed to open an input file, …
Re: Problem Passing Ifstream Pointer to Main Function and Dereferencing
Programming
Software Development
11 Years Ago
by histrungalot
##@dyl_ham, your last try was really close. Just move some things around. #include <iostream> #include <fstream> #include <cstdio> #include <cerrno> using namespace std; ifstream * openInputFile() { string fileName; cout << "Please enter a valid file name: ";…
Re: Problem Passing Ifstream Pointer to Main Function and Dereferencing
Programming
Software Development
11 Years Ago
by dyl_ham
histrungalot, I see what you're doing there. Thanks a lot! I'll give it a try now and see what I can come up with.
How to be Crash Free
Programming
Software Development
19 Years Ago
by meabed
…font=VERDANA, ARIAL, HELVETICA, SANS-SERIF][size=1]
Dereferencing
an uninitialized pointer[/size][/font] [list=1] [*][font…font=VERDANA, ARIAL, HELVETICA, SANS-SERIF][size=1]
Dereferencing
a deleted pointer[/size][/font] [list=1] [*][font…=VERDANA, ARIAL, HELVETICA, SANS-SERIF][size=1]
Dereferencing
an uninitialized pointer is prevented by rule 1. …
Cygwin socket problem
Programming
Software Development
14 Years Ago
by TheBeast32
… incomplete type stuff.c:40: error:
dereferencing
pointer to incomplete type stuff.c:41: error:
dereferencing
pointer to incomplete type stuff.c… incomplete type stuff.c:46: error:
dereferencing
pointer to incomplete type stuff.c:51: error:
dereferencing
pointer to incomplete type I added…
Re: Cygwin socket problem
Programming
Software Development
14 Years Ago
by developer_borja
…;sin6_addr);[/CODE] If you're getting this error: [CODE]error:
dereferencing
pointer to incomplete type[/CODE] Chances are you left out…
header file, librerie, make ed error....
Programming
Software Development
15 Years Ago
by edel
… named ‘ifr_name’ main.c:374: error:
dereferencing
pointer to incomplete type main.c:376: error:
dereferencing
pointer to incomplete type main.c…
Segmentation Fault Problems
Programming
Software Development
14 Years Ago
by Alibeg
… for Segmentation Fault if it isn't: 1.
dereferencing
NULL pointer 2.
dereferencing
uninitialized pointer 3. accessing memory out of bounds or…
Regarding Endianess
Programming
Software Development
13 Years Ago
by myk45
… for that. i have a small doubt regarding endianess and
dereferencing
of elements This is what i tried: [CODE]#include <… machine(Intel). Now, my question is, how exactly is the
dereferencing
of the pointer take place? i mean the bytes are…
1
2
3
10
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC