"Write a bool function template that accepts a vector of arbitrary type and a value of the same type and returns true if the vector contains the value, and false otherwise".
I'm reviewing for my...
Type: Posts; User: bigboybz
"Write a bool function template that accepts a vector of arbitrary type and a value of the same type and returns true if the vector contains the value, and false otherwise".
I'm reviewing for my...
Sorry, I'm such a C++ noob. I had no idea a string would be that big of a deal. I'll post my full code like I should have from the start. I've changed some things to fit what you said, but for the...
I'm writing a program that accepts a file and inputs each line from a txt file into a vector. Is it correct to use:
class filereader
{
public:
filereader(string filename);
private:
I'm writing a program that accepts a file and inputs each line from a txt file into a vector. Is it correct to use:
class filereader
{
public:
filereader(string filename);
private:
so class B : virtual public A?
Thanks
I also get this error: "conversion from ‘A*’ to non-scalar type 'A' requested"
I'm using various classes that derive off each other, and I'm coming across an error in my g++ compiler that says "‘A’ is an ambiguous base of ‘D’". My code goes something like this:
class A...
hmm, thats strange.. i assumed the int main was ok because it was given to me. But thanks so much for your help!!!
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Tweet
{
public:
Tweet();
Brilliant... thank you so much for this help!
The final errors i'm getting are:
request for member ‘addtweet’ in ‘tw’, which is of non-class type ‘Twitter()’
request for member ‘gettweet’...
The main function is what was given to me, and I attempted to write the rest. It's pretty basic, but I'm having trouble with the gettweet part.
#include <iostream>
#include <vector>
using...
I recently took my C++ midterm, and I want to make sure I know how to do the things that it asked me to do. Can some people help explain to me how this would be done?
Create a class Tweet with a...
OK, I'm using an iterator to point to each character that the file has, and this is the code i've come up with (encoding atleast)
#include <iostream>
#include <vector>
using namespace std;
...
The part i'm confused on is how can I get the characters from a file into a vector<char>?
I'm sad, my thread was stolen by ms word talk =(
Sorry about that, I fixed the indenting.
What would I set temp to under the decode function?
I'm trying to write a program that encodes alphabetical characters from a file into morse code, and vise versa. I have it partially written, but I've confused myself while trying to write the encode...