Beginners - November 2013 (Page 9)

by furaha
c++ arrays
 
how to declare and use arrays
[1 reply] : http://www.cplusplus.com/doc/tutorial/arrays/ have a read about it he... (by RabMac)
find the errors in c++
 
Write your question here. Find the errors and display what is the output?? The goal is to take a string that contains currency like the one below and to ste...
[1 reply] : This is clearly some sort of homework or exercise. We're not going to ... (by MrHutch)
by dean
partial template specialisation
 
Hi there, I am trying to partially specialise a template with a fixed param, while keeping the other variables. Right now I am hitting a compiler error when...
[5 replies] Last: ok, thanks everybody for the replies. Kind regards, Dean (by dean)
by eran
length array in formation
 
Write a function that accepts an array of integers and returns its length several different organs (apart) if i wirth formation 4; 1,2,1,2 its return 1 why...
[3 replies] Last: Your input is essentially {a, b, c, d}. Your nested loop generates pai... (by keskiverto)
by Joe90k
Please Help with Code for Civil Engineering Student!
 
Hi All, I am a civil engineering student, I have never done anything code related and have been dropped in at the deep end with this project really, it is th...
[9 replies] Last: And are you compiling it as a .exe? Because I think Macs don't execute... (by Code Apperentice)
by h4ever
Array template
 
It is code from 2001 demonstrating use of templates. When I try to compile is it makes some errors. I belive the code was OK when the man did it in 2001 but for...
[2 replies] Last: array.h(158): warning C4346: 'www_builder_cz::Array<Typ>::iterator' : ... (by h4ever)
Extracting string from txt file
 
Hello how can i extract a string from a txt file? while (!infile.eof()) { infile >> productID ; //assume that infile.ge...
[13 replies] Last: Well, if you got it to work, then that's good. But as for the structur... (by Chervil)
Calling member functions of a class instance stored in a vector array
 
I am trying to call Greet() which is in one of the class Critter instances in the vector array crit_array . When trying to call it using crit_array .Greet()...
[1 reply] : Critter is a vector, so crit_array is a vector templated on int. ... (by MikeyBoy)
by nvrmnd
derived::derived(const derived&)' is implicitly deleted because the default definition would be ill-formed:
 
why is it that when i derived from a base class w/ deleted operator= and copy c'tor, the derived class' operator= and copy c'tor is also implicitly deleted ? ...
[1 reply] : Because if you there's no way to copy/assign the base class contents, ... (by MikeyBoy)
Not sure to use setw or what (interface)
 
This is my code: #include <iostream> #include <iomanip> #include <string> #include <vector> using namespace std; class Food{ public: vector <int...
[1 reply] : cout << left << setw(2) << pizzaID <<" "<< setw(20) << pizzaNam... (by nvrmnd)
Read a data file containing objects of 2 diff. classes
 
I'm writing a program for managing the stock details of a book store. It sells both books and their audio cassette versions. My defined classes are: class...
[2 replies] Last: First of all, thanks for replying. 1. I have never used a virtual fun... (by Athira L I)
Problem declaring member functions with class template
 
Whats wrong with my member function Greet()? I am using a class template so i can have instances of my class Critter in a vector array. My problem is that i can...
[2 replies] Last: Works perfect thank you very much, I greatly appreciate it! (by Coasterfan87)
Three Integers from Least to Greatest
 
I thought i was off to a good start but the minToMax function only sorts the first to variables. What am i missing? #include <iostream> using namespace...
[3 replies] Last: Thank you guys so much for the help (by Raspb3rry14)
Really serious problem C++ even hard to explain
 
So I'm having a headache with this ugly bug... I need to count how many words (which are longest in txt files) in both txt files (CD1 and CD2) repeated... I kno...
[18 replies] Last: ? (by deividas717)
Do while loop help?
 
Hello, do my program isn't working properly. It would just print a lot of *. My program's main goal is to print a pattern. ex: Input = 5 ***** ***...
[3 replies] Last: ++x will increase x as well #include <iostream> int main() { int x=0... (by ats15)
Copy constructors/destructors
 
I've been reading about how to write your own copy constructors and destructors when using classes. I tried writing a simple program just to get a feel for the...
[8 replies] Last: Now make Song moveable (nothrow_move_constructible) and we find that t... (by JLBorges)
Hash Table Error Help!!
 
This is the error that I'm getting: Unhandled exception at 0x013c4218 in Hash_Table.exe: 0xC0000005: Access violation reading location 0x0000001c. Her...
[13 replies] Last: [quote=natekelsey]Yes I saw your questions and I get what the problem ... (by cire)
Having difficulty understanding what is being asked
 
I am being asked to create a class called Person with 3 private members. Then I'm being asked to create Accessors to Mutators for each field. I don't understa...
[5 replies] Last: Something like char name ; You can't exactly return arrays though yo... (by giblit)
by y510
C++ calculator program
 
why do i get error: a "}" at the end of my code #include <cstdio> #include <cstdlib> #include <iostream> // std::cout & std::showpoint #include <i...
[3 replies] Last: after adding the semicolon and brackets and all it still has a compila... (by y510)
by zagzag
Linked Lists explanation
 
I am studying linked lists and I reach a point where I dont understand this expression.Take in mind that these are pointers to an object. lastPtr->nextPtr =...
[no replies]
November 2013 Pages: 1... 7891011... 80
  Archived months: [oct2013] [dec2013]

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