General C++ Programming - October 2011 (Page 20)

"Error C2228: left of '' must have class/struct/union", about fifteen times?
 
This is an expanded class example simulating a simple school course registration / display program. I'm getting the error C2228: left of '' must have class/stru...
[2 replies] Last: Wow, I had no idea. My instructor has been attempting to teach us the ... (by Killcycle)
by norEdz
count the number of letter occurrence in a file
 
how to do this? write a c++ program that given the name of a text file reads that file and counts the number occurrences of each alphabetic letter in the text. ...
[7 replies] Last: I did it! thank you all for your help. it really helped me.. :) (by norEdz)
how to display three (+ve) numbers in asending orders
 
I was given a assingment to complete on dev c++ but i am having difficulty to do so. could someone plz tell me how to do this on dev c++? >Develop a console ...
[1 reply] : The program should ask the user to input three whole positive numbers... (by shacktar)
by Enea
Link C++ to folder
 
Can anyone tell how to link a c++ program with a folder for example : to use a username and password to access a certain file or foleder.
[no replies]
need help on class
 
--------------------------------------
[2 replies] Last: as in, how can i add it in accordingly ? (by wantyoubadly)
Access Violation Writing Location - Linked Lists
 
I've been filling in bits and pieces of this code, and the part I'm having difficulty with is the List::insert() function in List.cpp. When I try to do any...
[2 replies] Last: Turns out I was constructing Node all wrong. I had to add the pieces ... (by stephaniejohnson24)
how can i insert unknown number of strings with cin
 
hello all, i would like to ask how could i use cin to take unknown number of strings for example i want to take and use all the strings below alpha beta ...
[16 replies] Last: ok i will try this.. with a search in the web i think this is the sol... (by vagelis)
How to generate a subset of size n of a given array?
 
I am using following code to generate subsets of size n: void AlgoMMPCbar::subs(const std::vector<unsigned int>& org, const std::vector<unsigned int>& pre, si...
[no replies]
Is there a memory leak?
 
I have a c++ code. class example { public: int div(int a, int b) { cout << a/b; } }; example * init() { example *a; a = new example; return a;...
[8 replies] Last: Thanks. So there is no leak. I always handle exceptions. It was just a... (by tolga gerekci)
Templates and Operator Overloading
 
I'm having trouble overloading the operator in a Linked List class I'm making. The class is templated, so I'm not sure exactly how to overload it. Every time ...
[1 reply] : This isn't quite correct cout << "Get(" << pos << "): " << myList... (by guestgulkan)
Assertion Error and Ostream problem
 
I'm having two problems with my code. First problem: I'm trying to get it to print correctly, but I can't figure out the best way to call the Winery class' <...
[no replies]
by XXXW0
Binary to Ascii Text Conversion
 
I used this function outside of main to find the binary equivalent to a ascii text character bool* ChartoBin(int c) { static bool binarr ; for (int i=0;...
[1 reply] : newb16 from another forum showed me this: if s is the number in binary... (by buffbill)
by K Nev
Need help with calling functions (Inheritance hierarchy)
 
Okay so I have an Inheritance hierarchy and I need help with one of my classes. I have a class called LINKED_LIST and a class called STACK. STACK's functions ne...
[no replies]
Need help with my constructor (inheritence hierarchy)
 
I am not sure what the copy constructor in Humanoid should look like since it is inheriting Creature that has dynamic data. This is what Creature Class looks...
[7 replies] Last: struct foo{ foo(int dummy){} }; int main(){ foo bar; //no matchi... (by ne555)
What is the point of having this?
 
I have seen classes in c++ but my book puts this in their classes code template <class Type> // What does this mean? struct nodeType { Type info; no...
[1 reply] : Try checking this out: http://cplusplus.com/doc/tutorial/templates/ (by Zhuge)
Writing a code
 
I am kind of new to C++ so I wanted help writing a program where the user enters the text and the program cout word and its number of repeated times. Example:...
[5 replies] Last: syntax error line 10! (by ceruleus)
Assembly code help
 
i know that this site is for c++ but i don't know where else to ask my question. i am working on a lab and it involves working with assembly code. The code is t...
[3 replies] Last: Cut the red wire, xP (by ne555)
Code clarification (Easy question)
 
I am going through some undocumented code and I am trying to figure out what this is doing (modified for simplicity): string myArray = {"one","two","thre...
[2 replies] Last: 3. If you don't want that warning, then don't enable it. I think it wo... (by ne555)
Finding max number in an array of a custom class
 
I have an assignment that has a file with a bunch of students info listed. I made a student class to handle all of this and another thing i need to do is find ...
[3 replies] Last: float maximum_value = studentPtr .GPA; student *maximum_element = stu... (by ne555)
Pushing an object on a Stack
 
I keep getting errors every time I try to push the instance of the object instead of an int. Any suggestions on how to get it to compile? main(): #include ...
[2 replies] Last: Thank you so much ! :-) (by itsjuzme)
October 2011 Pages: 1... 1819202122... 36
  Archived months: [sep2011] [nov2011]

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