General C++ Programming - April 2008

typedef problems
 
i think the problem lies in the way i was using my typedef this is how it was explained to me and i would be very appreciative if someone would let me know what...
[6 replies] Last: No worries :) (by Zaita)
Problem with reading in values for calculations
 
Hi everyone! I'm working on a code to read information from a text file, calculate averages, and names. My infile looks like this: Johnson 85 83 77 91 76 An...
[3 replies] Last: No worries. (by Zaita)
ORDER IN WHICH OBJECTS ARE DESTROYED
 
class a{--------- ---------}; int main(){ {a q,w,e; } } doubt:in the above program object 'q' is created first then 'w' and later 'e' is c...
[1 reply] : class A { A() { }; ~A() { cout << "A Is being destroyed" << end... (by Zaita)
If I need a paid tutor...
 
If I need a paid tutor, where would be the best place to find one?
[2 replies] Last: Or just ask here. but if you want formal tuition, your best bet wou... (by closed account z05DSL3A)
How do I read chars from a file into an array?
 
I need to input 100 characters from a 10x10 grid into an array. How would I go about inputting the file into the array using very basic C++?(I am a beginner) ...
[1 reply] : Here's an example of how to read, character by character, a single lin... (by jsmith)
by ky619
Append function in a class.
 
I am working on a project and am having problems with the append function. I am not sure how to finish the implementation. Let's hope i get the code tags right...
[7 replies] Last: As I don't know anything about the internal of you class, you could tr... (by closed account z05DSL3A)
saving bitmap file
 
Hey guys i have a header file and now i am writing the implementation file and defining the constructors..i am having trouble with 1 but.. void bitmap:save (...
[6 replies] Last: Hmm... @shotjase I had posted a reply to your other copy of this... (by closed account z05DSL3A)
need help deperately pls!!
 
Suppose that I have to write a program where a mark out of 100 is entered end then the corresponding symbol has to be displayed. A Message indicating whether t...
[4 replies] Last: Thanks grey wolf that help me loads!! This damn university is shit in... (by bdeklerk)
by ky619
C++ Project.
 
Hey, I am confused on what exactly I am doing on this project. I am given 3 files; mystring.h, mystring.cpp, and driver.cpp and just asked to implement and test...
[1 reply] : It looks like that's what you're supposed to do. An excerpt from mystr... (by rpgfan3233)
by gospes
dynamic array
 
i'm writing a prog in C++ and having trouble with the array of pointers. i got a fragmentation fault, so in tracked it down to a single function and added some ...
[4 replies] Last: thanks Rpgfan, that was it. (by gospes)
by SMILE
how to separate integers into four digists
 
I only know that (% and /) can be used but i don't know how e.g separating this numbers 14562398256921452365 into : 1456 2398 2569 2145 2365 please any...
[2 replies] Last: what you could try is to take your integer 14562398256921452365 and di... (by bdeklerk)
by Tarch
Get type of a pointer to member
 
Hi all, can someone tell me if there is a better way than the following to get the type of a pointer to member: class A { public: void foo...
[3 replies] Last: Ok, thank you very much. Bye! (by Tarch)
ORDER IN WHICH OBJECTS ARE DESTROYED
 
class a{--------- ---------}; int main(){ {a q,w,e; } } doubt:in the above program object 'q' is created first then 'w' and later 'e' is c...
[2 replies] Last: Yeah something like this should work: #include <string> #include <i... (by rpgfan3233)
Variable of class member
 
If I call the addSong function in the main(), the songHead pointer variable changes every single time, but If I give the value like below. list.addSong("a"...
[2 replies] Last: The problem is that you don't create deep copies of the input string, ... (by ropez)
what does this mean
 
error C2061: syntax error : identifier 'st2'
[1 reply] : The compiler found an identifier where it wasn't expected. Make sure t... (by closed account z05DSL3A)
this is ridiculous easy
 
It's been awhile and I seem to have forgotten some of the simplest things... le sigh char handle ; // don't want the handle to get bigger than 20 chars han...
[9 replies] Last: trying to stick with old school char * (by soldstatic)
by TriTz
Void* or Template for Linked List
 
Hi! guys! I have a question about generic linked list. I made one using C. typedef struct list{ void *info; struct list *next; } List; but now...
[1 reply] : Polymorphic containers are not an easy problem. There are a couple of... (by jsmith)
by black
Global Pointers
 
hey.... i want to use a pointer that i can access in my class as well as in the main()....can anybody explain me how to define global pointer???
[1 reply] : Make the pointer static in the class (make sure it is public), and the... (by rpgfan3233)
VIRTUAL?
 
in inheritance we can declare base class as virtual base class and as normal base class. what advantage will we get by declaring a base class as virtual base c...
[1 reply] : I asume you are talking about virtual inheritance. http://en.wikiped... (by closed account z05DSL3A)
hash function help
 
I am a beginner at c++ and i need help for writing a hash function code for this piece of code can anyone please help me? #include "LinkedList.h" using names...
[1 reply] : What kind of problem u r facing? Please state the same.\, so that it ... (by DiptenduDas)
April 2008 Pages: 123... 11
  Archived months: [mar2008] [may2008]

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