Beginners - July 2008 (Page 8)

Overloading << and its friends
 
Hey there, so I'm trying to overload the operator << as well as the basic arithmetic operations in a class Algebraic that I wrote. Sadly its not behaving as I ...
[10 replies] Last: Glad to have helped. The ticket is to remember that arguments to op... (by Duthomhas)
[solved by myself]Accessing private class members
 
Everywhere I read, to access private data, they say you must use a "public member function". What exactly does this mean? Do you have to do the following: #...
[no replies]
Pointers and arrays - why is this working?
 
I'm studying on my own using a book. I'm working my way through this chapter on pointers and I wanted to try something (testing is what learning is all about ri...
[3 replies] Last: @ Faldrax - thanks for the reply. The code itself has comments next to... (by radhack242)
by tyler
finding greatest character
 
i'm new to c++ and i've been trying to figure out a way of finding out the largest number after inputing > 25 numbers. the use of if..else statements doesnt see...
[5 replies] Last: thanks a lot for the answers everybody (by tyler)
by karang
Difference between () and [] in pointers
 
Hi I am new to C++. int * a= new int ; int * b=new int(89) ; Here what does 10 specifies in the first statement and what does 89 specifies in the se...
[1 reply] : I'll hazard a guess then I'll go away and check what I say is correct ... (by guestgulkan)
by karang
Memory address
 
Hi I have written the following program int *a= new int(5); cout<<a<<endl; a++; cout<<a<<endl; a++; cout<<a<<endl; a++; cout<<a<<endl; ...
[1 reply] : ...new int(5); creates an int with the value of 5. To create 5 int... (by closed account z05DSL3A)
by JamesD
Access Violation with pointers to structures
 
When trying to use two pointers declared as a struct type, the code compiles fine, but at the first reference to the structure declared last, the program crashe...
[4 replies] Last: Both and A and B were pointing to invalid memory. It's just a fluke th... (by Zaita)
program compiles, but doesn't work
 
Hi all, Very new to C++... trying to create a hangman program using a char and bool function. Have been working on it for hours and after getting it to comp...
[2 replies] Last: http://www.cplusplus.com/forum/articles/1624/ and http://www.cpluspl... (by Zaita)
How to return the values in a function
 
I am trying to write code that will take the users input (book Title) & search for it. If the book is found, I would like to return (display) the values in the...
[6 replies] Last: I would keep display and search functions separate. For searching, ju... (by Duthomhas)
Debugging...?
 
I don't get the purpose or use of debugging. Every time I use it, it just runs my program. What does it do? What is the proper usage of it?
[1 reply] : A debugger is something like a CD player: it allows you to pause, rese... (by Duthomhas)
by gnt101
I need a compiler
 
Right now I'm using "Dev-C++" but, ANSI-C++ standard canot be suported by it, atleast thats what I think. So can someone tell me what program do you use for c...
[4 replies] Last: Yeah, look at this program: #include <iostream> using namespace std... (by QWERTYman)
by idono
user choice troble
 
I'm lost on what to do in this situation, i don't know if i should name the months month1 and month2 but the problem is if i do that what if they pick another c...
[3 replies] Last: I may have beaten you to it but yours gets higher marks for effort :) (by bnbertha)
calculating the size of a pointers data
 
hi If c represents array we can find out the size of array like this sizeof c / sizeof *c . Is there a similar way to find the size of memory alloc...
[5 replies] Last: You're right the OS knows nothing about destructors but the destructor... (by bnbertha)
Compilers? Where and how?
 
I believe I already have a sound understanding of the structure of C++ as I have used Game Maker and I understand it's very similar language. However, I have...
[6 replies] Last: You have to use "include" files, at the top of your code use statement... (by leeand00)
what static const variable do
 
I Know difference between static variable and const variable static variable: we can't reinitialize the variable but we can update const : we can't update th...
[3 replies] Last: Just to add to jsmiths comments A static, class scope object is ac... (by bnbertha)
by bomben
new operator and ownership
 
Dear all, I'm a bit confused about new and delete operator and when they go or not out of scope; So I have a couple of questions. So let's sta...
[2 replies] Last: It looks you addressed all my questions... great! Thank you very m... (by bomben)
by Etael
solving this algorithm
 
Write a program which to print all numbers with four digits ABCD, so that if we change the places of the second and third digit it will result in new number (AC...
[2 replies] Last: "with N" is very vague. I think you ought to ask your professor for cl... (by Duthomhas)
arithmetic of 3D array pointer
 
hi For 2D array we can navigate a pointer using row*no.of coloums+col arithmetic. similarly what is the arithmetic for navigating 3D dimensional array poi...
[2 replies] Last: Thank u very much . (by babu198649)
by Nandor
dlls
 
I have a function in my program: void tables() { BOOL freeResult, runTimeLinkSuccess = FALSE; HINSTANCE dllHandle = NULL; table...
[no replies]
Trouble creating a pattern
 
Hey, I am trying to create a pattern and can only get the first half going. I have tried negatives, switching up the signs, and nothing worked yet for me. Usi...
[2 replies] Last: thanks, I now understand my problem. (by porkshoulder)
July 2008 Pages: 1... 678910... 15
  Archived months: [jun2008] [aug2008]

This is an archived page. To post a new message, go to the current page.