No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
#include<iostream> #include<string> #include <ctime> using namespace std; class Dog { protected: string name; char gender; public: Dog(string theName, char theGender) /*constructor*/ { name = theName; gender = theGender; } ~Dog() { cout << "good bye: " << name << endl; } void bark(int n) { cout << name << ":"; … |
|
Hi all! So our T.A. gave us a function to use in our programming assignment as follows: [code=php] struct node *delete_from_list(struct node *list, int examnum) { struct node *cur, *prev; for (cur = list, prev = NULL; cur != NULL && cur->examNumber != examnum; prev = cur, cur =cur ->next) … |
|
Hey, just curious. Is atof() a C++ only function or will it work in standard C? |
|
This isn't entirely a programming problem, but it may be at its base, which is why I'm bringing it to you guys. For my assignment, I have download a .txt file from my prof's webpage, and then have my program open it. The file, when opened in a web browser, … |
|
Hey everyone, this program's been killing me. I have to create a program that takes another program as input and counts the lines. Pretty simple, except that to do this, you have to count semicolons which means you have to negate semicolons that are comment text or within double quotes. … |
|
Hi everyone, I'm kind of stuck, is this the correct notation to compare a char to double quotes? variable == "\"" |
|
Hey everyone, I have a kind of large problem. I am trying to input something in C, a number between 0 and 50,000, using scanf(). I understand how scanf generally works, and it does for the most part, but for some reason if the number I enter is greater than … |