49,761 Topics
| |
the only problem in this code is i must use longer username and password like for example dani and the password is web, not d and w only. this is very easy but i didn't make it, please help me with this. In this program, after you log in you … | |
Hi I'm working on a project. i'm using c++ gui windowns forms. when people press the red cross, then the program need to do something before exiting the program. can someone tell me how to make this. what event I need to use. thanks in advance | |
// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: public Person { public: Teacher(std::string theName, std::string theClass); void teach(); void introduce(); protected: … | |
Hi , A simple stupid question: I am to read the contents of a file that goes this way RXbytes = 0 b TXbytes = 0 b RXbytes = 3 Kb TXbytes = 2 Kb RXbytes = 119 Kb TXbytes = 6 Kb RXbytes = 189 Kb TXbytes = 5 … | |
hi. Im trying to make an expresion tree for every ER that I read each ER will be transformed into postfix and saved in a string, which I'll be sending to arbol_expresion() to create it`s tree expression Searching on the web I found a method to convert the postfix expresion … | |
I don't know what I'm doing wrong but I open my filed correctly but it doesn't display the contents in the file. Please help. [CODE]#include <iostream> #include <fstream> using namespace std; int main() { const int SIZE = 81; char input[SIZE]; fstream dataFile; dataFile.open("info.txt", ios::in); dataFile.getline(input,SIZE); system("pause"); return 0; }[/CODE] | |
I've done Hello World programs with Visual C++ Express 2010 before, but I always checked the "Empty Project" option. This time I selected a Console project and took the defaults. Program is below. [code] // HelloWorld.cpp : Defines the entry point for the console application. // using namespace std; #include … | |
I want a c++ code to : play a segment of awave between two times entered by the user. for ex :to play a wave between 4 and 100 seconds. | |
My program is suppose to create a two dimensional array that is read from a file. And use a recursive function to find how many white areas ('w'). My program runs with no errors but i cant get any response from my recursive function. Cpp file: [CODE]/* This program accepts … | |
First, my program works. I'm posting my code for my own personal benefit with the help of your guidance to know of any better way of handling this code. I was considering the use of [CODE] while(cin >> grabname) [/CODE] to possibly continue grabbing from the input stream until '\n' … | |
hello, i wrote a little program, but There are some problems. Can anyone help me? here is the code: [CODE]#include <iostream> #include <math.h> #include <fstream> using namespace std; bool tikrinimas(const char *filename) { ifstream failas(filename); return failas; } int main () { tikrinimas("example.txt"); bool failas; if (failas==true) {cout << "good";} … | |
Hey guys, i been trying to tokenize a string using the boost library. [CODE]int main(){ using namespace std; using namespace boost; string s = "This is, a test"; tokenizer<> tok(s); for(tokenizer<>::iterator beg=tok.begin(); beg!=tok.end();++beg){ cout << *beg << "\n"; } [/CODE] The problem i am facing currently is that i am … | |
Hey, im trying to create a string like the following in c++ but am unable to find a example in the internet in order to help me as im new to c++ and still trying to learn. [B]XXXXX-XXXXX-XXXXX-XXXXX[/B] [QUOTE][LIST] [*]Custom Length [*]Custom Block Size [/LIST][/QUOTE] if someone would mind how … | |
Can anyone help / teach me on how to build shapes, specifically face shapes, in c++? We are assigned to build something like that and Im having a very big trouble abt. it. Any comment will do. Sites, Sample Programs, and just about anything connected to it. The header file … | |
hello c++ dev team!!! i need lilibit help from you. like i write in my prevois thread i bulding now lab mangement, and tks to you i passt the SQL lavel, (tks lot)!!! so i'am stuck now in the view step, that meen when the seller well open the software … | |
[CODE]// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: public Person { public: Teacher(std::string theClass); void teach(); void introduce(); protected: std::string clazz; … | |
I need to keep my coding skills up to snuff, but I'm having kind of a block. I don't know what to code. Anyone have any idea of some small projects that I can work on? Perhaps ones that would look good if i sent them to companies? Don't ask … | |
I commented by the last line. I am trying to print out the string in reverse. [CODE] #include <iostream> using namespace std; void add(string n); int main() { string B ="ABCDEF"; add(B); } void add(string n) { if(n.length() <= 1) { cout<<n[0]<<endl; return; } else { cout<<n[n.length()-1]; add(n[n.length()-1]); //this lines … | |
When reading books I was thinking that data hiding was to hide the data from the user so somebody who is using a C++ executable is an user and data hiding is implemented to hide the hide the data from the user( somebody who is using the exe file produced … | |
The Predator‐Prey game is a simple board game where bugs (predators) and ants (preys) move freely across the board. The following is a description of the game rules: -Predators and preys move on a 2‐dimensional closed grid -Predators and preys are not allowed to move outside the grid -The game … | |
The compiler only displays a portion of the output and then it exits this is what it compiles: [code] =============================================== Operations on Empty lists: =============================================== Size = -886911509 Length = 0 empty list: Sum of two empty lists: Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-load-rules all stringlist(2449) malloc: *** error for … | |
I have been working on some code that calculates your BMI and then puts you into a category based on that. every time i try and run this program it either tells me that I am in the underweight class or the average class and I have no idea why … | |
Hey I am running into a problem with CoCreateInstance() in a program that I am using to try to disable all the network adapters. When I try to use [CODE]hr = CoCreateInstance(CLSID_ConnectionManager, NULL, CLSCTX_LOCAL_SERVER | CLSCTX_NO_CODE_DOWNLOAD, IID_INetConnectionManager, reinterpret_cast<LPVOID *>(&pNetConnectionManager) ); [/CODE] I get two errors. undefined reference to `_IID_INetConnectionManager' undefined … | |
Hey guys I've been asked to create an array of objects on the heap for my assignment but I cant seem to find any examples that explain it well enough on the web. So what I got is: [CODE]//Heabder File class Wheel{ public: Wheel() : pressure(32) { ptrSize = new … | |
[code] #include <iostream> #include <vector> #include <algorithm> using namespace std; class A { public : void getData(); void putData(); bool operator==(const A &) const; private : int x; char name[90]; }; vector< A > v; void A :: getData() { cout << "id = "; cin >> x; cout << … | |
alright I need help and at this point I am desperate. Been working on this for a couple of days, mostly typing and then hitting the Edit/undo! This is a homework project. What the project is supposed to do is: 1. open a text file(einstein.docx) 2. Prompt user for a … | |
Well I been studying like a rabid dog foaming at the mouth since I have a higher level language under my belt and my initial failiure at c++ as a first language. Anyway getting near the end of my first little tutorial and have a few more questions. 1. I … | |
Hey, I've got my code finished but I need a working exe file but I cant find where it is. The only files I have are the source codes and a sql server compact edition database file whatever that is, which I cant open. Anyone know where I can get … | |
[CODE]// rational.cpp - Script 9.5 #include <iostream> #include <string> // Declare the class. class Rational { public: // Constructor: Rational(int num, int denom); // The overloaded methods that implement // arithmetic functions: Rational operator+(Rational rhs); Rational operator-(Rational rhs); Rational operator*(Rational rhs); Rational operator/(Rational rhs); void print(); private: // normalize() will … |
The End.