49,761 Topics

Member Avatar for
Member Avatar for danish_izads

[CODE]#include<fstream.h> #include<stdio.h> #include<string.h> char num; int don; class sudoku { public: void putin(); int retchar(); void putout(); char name[30]; int a1,a2,a3,a4,a5,a6,a7,a8,a9,b1,b2,b3,b4,b5,b6,b7,b8,b9,c1,c2,c3,c4,c5,c6,c7,c8,c9,d1,d2,d3,d4,d5,d6,d7,d8,d9,e1,e2,e3,e4,e5,e6,e7,e8,e9,f1,f2,f3,f4,f5,f6,f7,f8,f9,g1,g2,g3,g4,g5,g6,g7,g8,g9,h1,h4,h2,h3,h5,h6,h7,h8,h9,i1,i2,i3,i4,i5,i6,i7,i8,i9; }; void sudoku::putin() { cout<<"\nEnter the Character of Sudoku "; cin>>num; cout<<"\nEnter the Name of Sudoku "; gets(name); cout<<"\nEnter the Values of first row "; cin>>a1>>a2>>a3>>a4>>a5>>a6>>a7>>a8>>a9; cout<<"\nEnter the Values …

Member Avatar for danish_izads
0
180
Member Avatar for punchinello

[CODE]class HRException { public: HRException() : m_pMessage("") {} virtual ~HRException() {} HRException(const char *pMessage) : m_pMessage(pMessage) {} const char * what() { return m_pMessage; } private: const char *m_pMessage; };[/CODE] It's a definition of an exception class I guess. How does the colon and the following "m_pMessage("")" work? Why does …

Member Avatar for punchinello
0
129
Member Avatar for claudiordgz

Hi guys, I'm new at C++ and I'm learning the basics on binary files This is what I've done: 1.- I created a class Criminal with basic data (age, crime type, criminal name) [CODE] class Criminal { private: int vnSerie; char vNombre[ 36 ]; char vtCrimen[ 20 ]; int vEdad; …

Member Avatar for Ketsuekiame
0
188
Member Avatar for Neon_Jesus

Hi, I am new to C and C++. This is my first course on the subject and my instructor handed out a printout in class with code on it to get us started, but he did not go over any other code or teach us any C. I can only …

Member Avatar for drkybelk
0
218
Member Avatar for BecomingPro

Well, heres a code that I wrote that displays the number of letters in lower case of any sentence that I put into the program. [CODE]#include <iostream> #include <string> using namespace std; int main() { int count[256] = { }; string str; getline(cin,str); for(string::iterator it = str.begin(); it != str.end(); …

Member Avatar for WaltP
0
114
Member Avatar for Web_Sailor

Hi, I want to prevent the sorting and preserve the original order in my container. below is the example. How can I do it ? string one = "6"; string two = "7"; string three = "2"; string four = "8"; veck.push_back(one); veck.push_back(two); veck.push_back(three); veck.push_back(four); veck.push_back("9"); veck.push_back("12"); veck.push_back("13"); veck.push_back("5"); I …

Member Avatar for Ancient Dragon
0
98
Member Avatar for asapgyritos

#include <iostream> #include <string> using namespace std; long getBarcode(long code); //Gets the Barcode from the individual. long verifyCode(); //verifys the code and makes the appropriate conversions. void displayCode(long& code); //Dislpays the barcode given by the individual. int main() { long code; displayCode(code); return 0; } long getBarcode(long code) //Gets the …

Member Avatar for griswolf
0
118
Member Avatar for douglaspr

Good afternoon, I have a problem reading a txt file in my dll Code: bool LeProtect () { char str [255]; FILE * arq; arq = fopen ("protect.ps", "r"); if (arch) { while (! feof (arch)) { fgets (str, 255, arch); printf ("% s", str); } } fclose (arq); } …

Member Avatar for douglaspr
0
110
Member Avatar for Isimanica

Simply put I have an array of Data that is a total of 40 numbers that are between 1 and 9. I know how to make a function display and calculate just the frequency of the array. I know how to create a histogram based upon data from the array …

0
55
Member Avatar for jae5086

I am just trying to end this program when the user chooses x or X but without the default "Enter a valid operator." The rest of the program works great (thanks to previous help). Sorry this isn't pasting perfectly. [CODE] do { cout << "Enter an operation: + - * …

Member Avatar for jae5086
0
179
Member Avatar for Bri426

Hello everyone :) My C++ class just started learning strings the other day. We were given a simple program that's due tomorrow, but I'm having a bit of trouble with it. I've emailed my teacher, who says I'm on the right track but need to fix something in my while …

Member Avatar for NathanOliver
0
192
Member Avatar for lauruskamj

[code=c++] #include <cmath> #include <iostream> using namespace std; void F2(int, int, int, int&, int&, int&); int main ( void ) { int X=1, Y=2, Z=3, A=4, B=5, C=6, A1=7, A2=8, A3=9; F2(X, Y, Z, A, B, C); cout << "X=" << X << "Y=" << Y <<endl; cout << "Z=" …

Member Avatar for NathanOliver
0
97
Member Avatar for OPTIMUS999

I have a payroll program that I been working on for a while and I gotten my code written. Yet, when I compile the program it keep giving me erros and I can't figure out why. I wonder is there anyone out there can tell me why I keep getting …

Member Avatar for NathanOliver
0
2K
Member Avatar for MindTrixz

Ok so I have the program set up for initial movement of two sprites that move toward one another and when they collide they return to their orignial position. But I need to know how to have them have randomized starting points and continue to move and bounce of the …

Member Avatar for MindTrixz
0
91
Member Avatar for rtdunlap

[code] #include <iostream> #include <conio.h> //needed to allow getch() #include <iomanip> using namespace std; int mean(const int [ ], int );//function prototype int main() // initializing the main program { char ch1; cout<<"Please enter the letter M for the mean function or the letter F for the Frequency function"<<endl; cin>>ch1; …

Member Avatar for Tellalca
0
111
Member Avatar for lasl0w

I have a case where I am not allowed to use the string class so I am using a char array. Does anyone have any idea why I am getting all the junk characters after my char array when i print? The input file is a 2 line file containing …

Member Avatar for lasl0w
0
9K
Member Avatar for techie1991

The last time I was making a program, I wanted to input from user a boolean answer (to save space ;)) An input of 0/1 works good (0-false) and (1-true), but if the user inputs the boolean values as "true" and "false", it comes out to be an error. So, …

Member Avatar for techie1991
0
228
Member Avatar for lauruskamj

Hey guys, I'm new here, obviously so if I do anything wrong let me know (gently). This program out puts x = 4 and y = 64 and I'm not sure why? [#include <cmath> #include <iostream> using namespace std; double Square(double); double Cube(double); int main(void) { double x = 2.0, …

Member Avatar for lauruskamj
0
105
Member Avatar for bejfake

Hi, I have to write game Minesweeper in OOP way. I have classes: Square which inherits to mineSquare, emptySquare, digitSquare and class Board which is responsible for initialize and control the game. I have such code: [CODE=c]#include <iostream> #include <typeinfo> #include "time.h" using namespace std; class Square{ public: Square(){ this->isShown …

Member Avatar for bejfake
0
176
Member Avatar for thr

hello I am c++ and java programmer and i want to develope user interface for aria2c ( internet download manager ) like IDM( windows internet download manager ) this software( aria2c ) programmed in c++ and i have one problem with this ( i never programmed user interface software with …

Member Avatar for myk45
0
210
Member Avatar for Jsplinter

I am trying to read in user input which is a file path (riddled with escape characters) into a CString. How can I do this without asking the user to replace '' with '\'? For instance: [code] CString myString; myString = _T("c:\test\file\j\mypath\path\user.bin"); wcout << myString.GetBuffer(myString.GetLength()) << endl;[/code] outputs: c: estQilejmypathpathuser …

Member Avatar for Jsplinter
0
271
Member Avatar for debasishgang7

i have a very basic c++ problem. this is my problem first i am assigning an integer. int i=000; when i am writing the value of this integer into a file its writing only one "0". How can i write the all four zero in the file. actually i have …

Member Avatar for Fbody
0
231
Member Avatar for doolali

Like it says in the title im having problems with putting a 2D array into a function. Im not sure on the syntax of putting an array into a function and using it, any help is much appreciated! Thanks in advance! [CODE]#include <cstdlib> #include <iostream> #include <string> using namespace std; …

Member Avatar for doolali
0
123
Member Avatar for odlanzednanref

im in trouble. this program would be easy if our professor taught the lessons well. but he's just like a student reporting his assignment. err. need your help..it would be so much appreciated. here's the problem: Virtual ATM Machine Problem Create a program that displays a log in menu that …

Member Avatar for Fbody
0
605
Member Avatar for cclausen7

I decieded to make a program that translates a phrase in english to "1337" or "elite". I have searched this website and others and can't find an answer to the error I'm getting. Thanks for any help :). Btw I'm using Bloodshed Dev C++, not sure if that matters. [code] …

Member Avatar for cclausen7
0
3K
Member Avatar for ramziabuabad

i write a function in c++ that take the name of obj file ... can you help me by tell9ing me how to read data using "in" and why his problem occur

0
93
Member Avatar for avataralien

I got a HTML file. I wish to parse the content I need to a text file. How can I make use of The unix utility application that strips the HTML markup tags from the file’s content leaving just content text? Thanks for the advise! [B][U]Partial HTML file code[/U][/B] [CODE]<thead> …

Member Avatar for shibblez
0
566
Member Avatar for ktsangop

Hi everyone! My function UsbID uses the libusb library ([url]http://www.libusb.org/[/url]) to get a flash disk's serial number. Libusb needs for some reason a Window created or else it doesn't work properly for me. So i created a CWnd inside my UsbID function which is invisible. My problem is that if …

Member Avatar for ktsangop
0
136
Member Avatar for baconswife

With this program I need to be able to find the circumference, area, diameter and radius of a circle. Here is what I have, please let me know of any advice you have: [CODE]#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main () { int x1; int x2; …

Member Avatar for Fbody
0
2K
Member Avatar for slychronic

Hello. i am looking for a C++ code that caaculates permutations...for example your input is abc output should be.. sample output is abc cba bca cab acb bac its just for revision so a full answer is appreciated...:)

Member Avatar for csurfer
0
130

The End.