49,761 Topics

Member Avatar for
Member Avatar for elsiekins

Before people go why would i want to create an array of size 0 - this is due to writing a test program. at the moment i have two diffeent ways of doing - not sure which one is even slightly correct 1.[CODE]uint8_t * BufferB = new uint8_t[0]; uint8_t* p; …

Member Avatar for elsiekins
0
420
Member Avatar for Mr_PoP

Hey all, i made a socket that accepting connection from a game , in the game u should type in username and password , i can recive it bt , it's like ummmm encrypted letteers and numbers my question is where to look at so i can understand how to …

Member Avatar for Mr_PoP
0
64
Member Avatar for MasterGberry

I have spent all of yesterday and this morning trying to think of how to do this, and I am still stuck. I don't understand how I can take a std::vector<char> (bytes) and extract values from it by combining the bytes. I have read everything that people have posted but …

Member Avatar for MasterGberry
0
210
Member Avatar for teoh

[CODE]class StudentMarks { public: int Marks; StudentMarks(); StudentMarks(int iMarks); char grade(); }; #include"grade.h" #include<iostream> using namespace std; StudentMarks::StudentMarks(int) { int iMarks=0; } /*StudentMark::StudentMark(int iStudentNewmark) { iStudentmark=iStudentNewmark;*/ char StudentMarks::getgrade() { if(iMarks>=80 && iMarks<=100) { return 'A'; } else if(iMarks>=75 && iMarks<80) { return 'A-'; } else if(iMarks>=70 && iMarks<75) { return …

Member Avatar for Clinton Portis
0
133
Member Avatar for DanielWuVB

which programming tool will be better if I need to write the POS system ? Thanks guy ..

Member Avatar for johnpitter
0
112
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
664
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
5K
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
121
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

The End.