49,757 Topics

Member Avatar for
Member Avatar for devin1pm

First of all, Im not too good at c++. so please take it easy on me. I try to change the password but i only want to change a certain password in the text file.But when the text file got re-write like only one new password exits. the whole file …

Member Avatar for JSPMA1988
0
662
Member Avatar for Nandomo

Okay, I was given a picture in bitmap format and a very brief explanation on seekp and seekg. And was told to write a program. I am supposed to make overwrite the image as its own negative and output in binary. I don't know where to even start, I know …

Member Avatar for Nandomo
0
126
Member Avatar for pseudorandom21

Using C++/CLI-- Is there a good way to return a value (not a DialogResult) from a form shown as a dialog? I plan to use Invoke on a method to update the previous form from within the dialog, if not. I also would like to thank the fine members of …

Member Avatar for Ancient Dragon
0
332
Member Avatar for Mayank23

how can i display all the account numbers that have been entered. it only shows the last account number entered, not any before it. heres the code- [code] #include <iostream> using namespace std; int main() { double deposit; double previous; double newtotal; double withdraw; int total; int number; int res; …

Member Avatar for Mayank23
0
176
Member Avatar for valeriy_zf

How to start using the GNU Octave libraries for Visual C++? I've read carefully the site but couldn't find any info how to start working with it in details. Especially I'm interested in this example: [url]http://www.gnu.org/software/octave/doc/interpreter/Nonlinear-Equations.html[/url] Starting from words: "Here is a complete example..." I wanna see this in C++ …

Member Avatar for Manlin86
0
3K
Member Avatar for namelyia

hi.. i'm new here i try to do bingo program in separated file but my class name is not declare.. i search on internet on how to solve it but still gives me error can some one help me??? [CODE]#ifndef BINGO_H #define BINGO_H #include<iostream> #include<stdlib.h> #include <time.h> #include <string.h> using …

Member Avatar for namelyia
0
267
Member Avatar for atticusr5

Hello out there, I am trying to compile some simple code but am running into a weird error that I can not figure out terminate called after throwing an instance of 'std::ios_base::failure' what(): basic_ios::clear Aborted This is happening when I do an Infile>> read in the code below. What I …

Member Avatar for Fbody
0
4K
Member Avatar for Mayank23

i made a bank program, it askas the users to put in their account number. it works with a while loop. i ask for the person to enter 1 to start or 0 to stop. i need help on how to display all the account numbers that were entered once …

Member Avatar for Mayank23
0
115
Member Avatar for rebellion346

I'm just learning how to use templates so I don't really have any experience with them, and I can't seem to understand what I'm supposed to do ... there's apparently an issue with the showWeaponSpecs: error C2783: 'WS AssaultRifle::showWeaponSpecs(void)' : could not deduce template argument for 'WS' : see declaration …

Member Avatar for mike_2000_17
0
120
Member Avatar for TailsTheFox

Hi, I'm trying to develop a program that will, if a condition is not met, display an error message without having to close the background window. If I use [ICODE]Application::Start[/ICODE] It returns an error saying that the only one window can be open a once blah blah blah. I'm looking …

Member Avatar for TailsTheFox
0
4K
Member Avatar for artur7

When having a class: [code=cplusplus] class X { int data_; void f() { //shall I cache var data_? by doing int cached = data_ //and instead of this: if (data_ >= 0 && data_ < 1000 || data_ < 0 && data_ > -1000)//first version { //do something } else …

Member Avatar for mrnutty
0
95
Member Avatar for artur7
Member Avatar for vsvivek796

[COde]#include <iostream.h> #include <fstream.h> #include <process.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <conio.h> #include <dos.h> int pass(); void abt(); void start(); int pass() { char a[750],b[500]; clrscr(); textcolor(BLUE); textbackground(LIGHTGREEN); clrscr(); cout<<"\n\n\tENTER YOUR LIBRARIAN USER NAME\n\n\t"; gets(a); if(strcmp(a,"LIBRARY001")!=0) { cout<<"\n\tSORRY FOR THE INCONVIENIENCE,YOU HAVE NO ACCESS TO THIS …

Member Avatar for Ancient Dragon
-2
125
Member Avatar for gerard4143

Am I correct assuming that a reference to an object will not call the object's destructor when the reference goes out of scope? The code I attached supports my assumption but I'm not certain if its correct...Any comments? [code] #include <iostream> class myint { public: myint():itsvalue(0) {} myint(unsigned long val):itsvalue(val) …

Member Avatar for gerard4143
0
2K
Member Avatar for jusami

how do i include classes in my code. my lab notes say i need to include classes. [code] #include <iostream> #include <string> #include <stdlib.h> #include <cstdlib> #include <fstream> using namespace std; void login(); void Members(); void PassChange(); string inuser; string inpass; string user; string pass; string tempass; string data; string …

Member Avatar for thelamb
0
108
Member Avatar for Duki
Member Avatar for arthurav

I have the following program : [CODE] #include<iostream> #include<string> #include<conio.h> using namespace std; template <class T> class matrice { T **a; int m,n; public: matrice(); matrice(int,int,int); matrice(char *); matrice(int,int,T **); matrice(matrice &x); ~matrice(){}; template <class U> friend ostream &operator <<(ostream &,matrice<U> &); int getNrLinii(){ return m; } int getNrColoane(){ return …

Member Avatar for Fbody
0
187
Member Avatar for SolidSora

I have a Seat Class and I'm trying to get my main file to access the Seat class and it's not working. Here is my code: My seat class: [CODE]#include<iostream> #include<iomanip> #include<string> class Seat{ public: char name; bool available; Seat(char name, bool available){ this.name=name; this.available = available; } Seat(){ name="A1"; …

Member Avatar for Fbody
0
141
Member Avatar for Thuthu001

Hi, I need help with concatenating several bits values to one big value. For example: lets say I have these char variables which I want to concatenate to one value. [code] unsigned char x = 0x02; //00000010 unsigned char y = 0x01; //00000001 unsigned char z = 0x03; //00000011[/CODE] and …

Member Avatar for vijayan121
0
2K
Member Avatar for 991k30

I am trying to create a windows form using visual c++. I type the variable value in the text box in windows and read it in by clicking a button. The variable is now stored in the form1.h header file. I want to use that variable in the my_proj.cpp code, …

Member Avatar for Ancient Dragon
0
128
Member Avatar for MasterGberry

I am having issues with the compiler in checking to see if a piece of a string is empty or not. I have a feeling this is simple, but today has not been my day with this code, but I am still doing my best. Ty tableRow is a std::vector<std::string> …

Member Avatar for elsiekins
0
160
Member Avatar for ITHope

I am currently taking C++ but i am also in Software engineering. for my software engineering class we have to create a project(of our own choosing) coding included by April. my question is how would i use c++ to create a rigorous/simple software.... i want to do something pertaining to …

Member Avatar for daviddoria
0
175
Member Avatar for indr

i gave the copy constructor in the below code just to know when will it be called.. [CODE] #include<iostream> using namespace std; class counter { int val; public: ~counter() { cout<<"destructor"<<endl; } counter(counter&) { cout<<"copy constructor called"<<endl; } counter():val(0) {} counter& operator++() { ++val; *this; } int getval() { return …

Member Avatar for Fbody
0
218
Member Avatar for Crutoy

Hello , i was doing an exercise in book which asked to draw a diamond shape by displaying '*' using nested for loops. It took me quite a while to come up with a way to reverse the pyramid , and complete this exercise. So i was hoping some one …

Member Avatar for Crutoy
0
103
Member Avatar for megaLU

Hi, I'm very new to C++ and am trying to write a class to model affine transformations. I have written code for a 3x3 matrix and am now trying to write code for multiplying it by (x,y,z) where z=1. My problem is I can't return the two values for the …

Member Avatar for megaLU
0
153
Member Avatar for SacredFootball

Hello everyone. I'm just about finished with my degree and am now taking a Data Structures class. So far, it doesn't make sense to me. I'm seeing code snippets of 100+ lines that I could solve in 10. Hopefully I begin the realize the power of Data Structures soon. Anyways, …

Member Avatar for Moschops
0
192
Member Avatar for SamPrat

Hi Folks, I have written a read function which reads values from serial port(LINUX) . It returns values as pointer to char . I am calling this function in another function and storing it again in a variable as pointer to char . I occasionally got stack over flow problem …

Member Avatar for SamPrat
0
174
Member Avatar for pseudorandom21

For some reason, and it's probably one of those accessibility things like tab ordering, when I hit the spacebar after selecting a button on my form, the spacebar clicks the button. This is NOT acceptable, and I have considered a work around of selecting an invisible panel or other "dummy" …

Member Avatar for pseudorandom21
0
71
Member Avatar for exca

Hi all, I am trying to write a program that computes the areas of intersecting rectangles. The coordinates of the rectangles are given. A rectangle may intersect another one or just stand alone. My code is: [CODE]Rectangle class: #include "Rectangle.h" Rectangle::Rectangle(){ this->parent=this; this->area=0; this->x1=0; this->x2=0; this->y1=0; this->y2=0; this->visited=false; }[/CODE] [CODE]/* …

Member Avatar for exca
0
100
Member Avatar for skorm909

first off i have a game in the making, its pretty simple but im just getting the feel of making the game before i get into depth with it. I'm wondering how i can run my game without needing to open up visual c++ 2010 and running it from there... …

Member Avatar for mrnutty
0
149

The End.