49,761 Topics
| |
hello i'm really new at this and i dont ever know where to start can some one please help me start my project.... The Project is in a attachment at the bottom.... Please help and thanks... | |
Hey, I have to write a program using vectors that will input a list of positive integers terminated by a negative integer and output the unique numbers in the list in ascending order? Can anyone help me get started? | |
hello, [B]I have an assignment for my one class at school where I am supposed to write a program that creates lists of people who have met. Each line of input is a space-separated list of the names of people who have met. If a person is in a group … | |
I have this Lab for a class that I am taking.. It works as it suppose to... The problem I am having is that if I enter more than 11 char it goes all crazy.. I don't want it to do that... [CODE] #include <iostream> #include <cstring> using namespace std; … | |
Hi all, I have to write a program that will input a string and convert the string to an integer value. The program should then output the integer value multiplied by 2. Also im not supposed to use any built in functions.Can anyone help me? Thanks a million! Sana Zafar | |
The X424 is a 16-bit machine with a 16-bit address bus. There are 2^16=65536 memory cells, numbered 0 through to 65535. Each memory cell is 16-bits wide. The machine also has 16 registers, numbered 0 through to 15. Each register is 16-bits wide. Register 0 is the stack pointer. • … | |
I KEEP GETTING THESE TWO ERRORS: 1. error C2011: 'vehicle' : 'class' type redefinition 2.see declaration of 'vehicle' [CODE=c] #include <iostream> #include <string> #include "vehicle_imp.h" //IMPLEMENTATION vehicle::vehicle() { x = 0; y = 0; speed = 0; facing = 0; } void vehicle::turn(int facing) { facing=facing+90; if(facing==360) { facing=0; } … | |
Hello everyone, I am trying to understand composition versus inheritance in C++. I have looked at many web pages, but I haven't found anything that makes sense to me. Can someone please tell me where I can find some examples of programs that might make sense to me? I am … | |
I saw few treads referring to this subject but I just can't get this working includs.cpp [CODE]#include <iostream> using namespace std;[/CODE] main.cpp [CODE]#include "includs.cpp" #include "ispis2.cpp" int main() { ispis(); system("pause"); }[/CODE] ispis2.cpp [CODE]void ispis(){ cout<<"tets file"<<endl; }[/CODE] After compiling this I always get the flowing error [CODE]error C2065: 'cout' … | |
Ok, I have a class project to basically design a program that handles classes and vehicles. What I have so far is far from the ending product. I have made 3 classes, car, vehicle, and motorcycle. Car and motorcycle are dervied from vehicle. The car class has a set const … | |
Let's say "a" is a char and "b" a string. Why does it take longer to compute b+a than a+b? Strange, isn't it? | |
I need to capitalize the first word of each sentence from a text file and make the rest lowercase. the text file looks like this: April 7, 2010! here is some TEST data to see if THE prOGRAm will work. "what do you know!" wiLL IT? anything with '.' '!' … | |
Hi all, in a piece of code like this: [CODE] void Logger::logMsg( int msgLevel,const char* msg) { char input[strlen(msg)]; ... } [/CODE] is the input array dynamically allocated? In this case, do I have to use the delete [] in order not to have a memory leak? thank you! | |
[CODE]#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { char a_char; int cu = 1; while (cu != -1) { cin>>a_char; cout<<"Is a digit!" << a_char << endl; } system("PAUSE"); return EXIT_SUCCESS; }[/CODE] When I input a132, the output is: [B]Is a digit!a Is a digit!1 … | |
This is probably a really stupid thing to ask considering the development I'm doing (effectivly creating a virus scanner), but how do I link classes/cpp files? I have 3 applications/sections that I can compile/combine with a makefile, that's fine, but I need them to run 1, 2, 3 once the … | |
For example if I have this int type variable X that increment from 1 at the beginning to 10 when the program ends, how to open and write to 10 different files (data1.txt,data2.txt,data3.txt....) everytime X increments? I've tried with the following but it didn't work: [CODE]string filename ("data"); int X; … | |
I need a good book to learn CAsyncSocket and Csocket. I want to explain in greater detail the functions and the author is an expert in the field. What do you recommend? thanks | |
Hello. Just asking any fellow nerds out there who program games with c++ or know about it..... about libraries. I know c++ and a few non standard libraries. What I want to know, is what non standard libraries or extras i could use with my compiler to make professional standard … | |
[QUOTE=William Hemsworth;792993][B]mouse_event[/B] is used to emulate mouse events, not to detect them. If you want to be able to detect mouse clicks anywhere (even if your window doesn't have focus), you will have to use something like windows hooks. If your using the Windows API and just want to be … | |
Hi, I'm quite bad in c++ and i have this weird (for me), problem that i can't work around. [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; ..... int main(){ ... int *array1=NULL; int *buffer=NULL; size=....;//a certain size comes from function array1= new int[size];// it looks like both array1 … | |
| |
if we right like that: class myClass { int a; string b; char c; } what will be the size of this class? | |
I'm trying to set up a couple classes, but I'm getting an error: Linker error - Undefined reference to 'Node::~Node()'. I think it might have something to do with how my headers are set up, but I'm unsure what I need to do to fix it. (FYI I added using … | |
Ok so ive already looked up solutions to my problem and my teacher does not allow me to use a simple iterator for the delete instead this is a hard coded delete function. what this program does is ask the user for 10 numbers and creates a vector of size … | |
Hello, I am trying to input an unknown amount of numbers (exam scores) and output whether they are passed, failed, or invalid scores. Passed is any score greater or equal to 70, and failed is 69 and below. Invalid scores are out of the range between 0-100. Sample Input: 77 … | |
I'm working with 2d arrays (which I kinda understand) and a bubbleSort, which I sorta but don't really understand and perhaps those * and & which I'm totally lost on, especially the * which can mean what it means or the opposite of what it means? I don't get that. … | |
Hello, I'm trying to write a function that uses a C++ string object as its argument, and returns the character that appears most frequently in the string. How would I write this? Is a for loop necessary? Thanks for the help. | |
[CODE]#include <iostream> #include <conio> using namespace std; int main() { int MyArray[ 3 ] = { 12, 23, 34 }; //Note 1 int* ptrMyArray = MyArray; //Note 2 int* ptrMyArray2 = &MyArray[ 0 ]; //Note 3 int* ptrMyArray3 = &MyArray[ 0 ]; //Note 4 for ( … | |
[CODE]class BTreeNode : public LinkedNode { public: BTreeNode (BTreeNode* child0, int key0, BTreeNode* child1); BTreeNode (const BTreeNode& sibling); bool isNotLeaf (void) const; BTreeNode* findChild (int newKey) const; BTreeNode* addKey (int newKey, BTreeNode* newChild = 0); BTreeNode* getChild (int i) const; void write (ostream& outfile) const; private: void setChild (int i, … | |
Hi there, I'm trying to write code for an assignment that asks me to read a string and convert all uppercase letters in it to lowercase without using tolower(), since we haven't covered it yet. This is what I have so far: [code] #include <iostream> using namespace std; int main … |
The End.