49,757 Topics

Member Avatar for
Member Avatar for alvin_aldrich

Hi I need help on converting the sample c++ code. Can someone please help. Any help would be greatly appreciated. :D struct sample { int type; long arg1, arg2; }; struct sample sampletable[2][3] = {{{ 1, 0, 0 }, { 2, 0, 0 }, { 1, 0, 0 }}, {{ …

Member Avatar for Sten Ove Larvin
0
431
Member Avatar for stamatt45

[I]To make it easier to read, only the relevant code is below, and due to circumstances beyond my control im stuck using Xcode for the next week or so (hate this debugger).[/I] I need help fixing a seg_fault in my current program. It occurs the last time "buildPaths" is called. …

Member Avatar for stamatt45
0
222
Member Avatar for Nawaf15

Hi Everyone, I have this final assignment and I have so many difficulties getting it done. I'm supposed to write/code an address book where I could add, delete, display and sort data. I'm not too familiar with C++ as this is my first semester taking a programming course. This is …

Member Avatar for Schol-R-LEA
0
345
Member Avatar for cppgangster

I have strange problem and I dont know where it does come from. First I list here the struct I have problem : [CODE] struct _THREADPARMS{ //global definition in one of my header file HWND h_wnd; BOOL bContinueAccept; BOOL bConnected; CProgressCtrl* pProgress; CDialog* pDialog; }; [/CODE] then I declare global …

Member Avatar for cppgangster
0
700
Member Avatar for PrimePackster

Hello Guys, Well i have a problem, I coded a program to print the ascii table, then give the user a option to either convert character into ascii or ASCII to character. Well the latter is not working, and the loop to print the ascii table is having the same …

Member Avatar for PrimePackster
0
245
Member Avatar for Srinivas0

[CODE]#include <iostream> using namespace std; class Reverse { int n,num,dig,rev; public: void Rev() { cout<<"enter an integer number to check if it palindrome or not \t"; cin>>num; n=num; // rev=0; while(num>0) { dig=num%10; // 48%10=4 rev= rev*10+dig; // rev=48*10+4=484 num=num/10; //484/10 =48 cout<<num; } if (n==rev) cout<<"given number is palindrome"; …

Member Avatar for Srinivas0
0
171
Member Avatar for AlvinLiu

what is code mean? [CODE] void fo(){ count += 1 + !(count <5); cout << count <<endl; } [/CODE] Thank you .

Member Avatar for MandrewP
0
184
Member Avatar for l1nuxuser

Hello everybody i'am building a software to make lab management. So I need to save the data base. and i using SQLite. but I have problem the SQLite pramter is a const char. and the data from the software are CString. and becouse I using Unicode I can't convert them …

Member Avatar for kndubey88
0
644
Member Avatar for stereomatching

desired output [code] void desired_output{ namespace karma = boost::spirit::karma; unsigned int A[] = {10, 9, 8, 7, 6}; std::vector<unsigned int> v(A, A + 5); std::string generated; for(size_t i = 0; i != v.size(); ++i) { std::cout<<v[i]<<" equal to "; karma::generate(std::back_inserter(generated), karma::uint_generator<unsigned int, 2>() << karma::eol, v[i]); std::cout<<generated; generated.clear(); } } …

0
66
Member Avatar for babyhuyx

[CODE]int game = 3; int ckenonum; const int hkenostore = 4; int hkeno[hkenostore]; const int ckenostore = 4; int ckeno[ckenostore] = {1,2,3,4}; bool kenopass = false; for(int hkenostore = 1; hkenostore<4; hkenostore++) { do{ cout<<"Please enter a unique number between 1 and 15 (" << hkenostore << " of 3)\n"; …

Member Avatar for cutenaj12
0
2K
Member Avatar for Ty88

Hello everyone, it's my first time posting here and it's an urgent matter as I need the solution to this by midnight tonight :/ I'm really struggling with the all Big-Oh notation thing and I could really use your help. I have this C++ code: [CODE]void Teste::listarMaisAfastados() { int maior …

Member Avatar for Ty88
0
220
Member Avatar for qmanchoo

Good Evening everyone, long time lurker, first time poster. I have an issue trying to read information from a file that I'm struggling with. My function takes a file input object and reads information into arrays of type int, int, double, char (2 dimensional array). The file data looks like …

Member Avatar for WaltP
0
182
Member Avatar for ayaya3523

I have been working on this code all week and can not figure out why its saying that my identifiers are undefined.... Please Help! [CODE]class Invoice { public: // constructor initializes the four data members Invoice( string, string, int, int ); // set and get functions for the four data …

Member Avatar for Clinton Portis
0
517
Member Avatar for harde

[ICODE]* Slot Machine Program by Harde*/ #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { int x,a, b, c, token=4; srand(time(0)); cout<<"\t********************************************************\n" <<"\t* Welcome to slot machine. *\n" <<"\t* Would you like to play? (1 to play, 2 not to play) *\n" <<"\t********************************************************\n\n"; cin>>x; while(token!=0) {cout<<"You have …

Member Avatar for harde
0
333
Member Avatar for paranoidSandra

hi everyone!i'm working on a project and i'm getting two errors of the type mentioned in the title. here's the part of the code that generates the problem: [CODE] #include "Instance.h" //default constructor Instance::Instance(unsigned features) { num_of_features = features; fileName = "-"; category = true; keywords = new string[num_of_features]; featureID …

Member Avatar for paranoidSandra
0
172
Member Avatar for rockerjhr

UniversityDatabse.h [CODE]#include<string> #include<stdexcept> #include<iostream> #include<map> #include "UniversityPerson.h" class UniversityPerson ; using namespace std ; #ifndef UNIVERSITYDATABASE_H #define UNIVERSITYDATABASE_H class UniversityDatabase { public: UniversityDatabase() ; ~UniversityDatabase() ; void print() ; void Create(UniversityPerson *p ) ; void Delete1( string name ) ; void Delete2( string id ) ; UniversityPerson *Lookup1(string id ) …

Member Avatar for ravenous
0
405
Member Avatar for Hamilton89

I'm trying to make a thermometer that can show when the temperature goes out of the range of 17 and 24 degrees, when it goes below 17 degrees i want it to count how many times it goes below 17 degrees and how may times it goes above 24 degrees …

Member Avatar for mikrosfoititis
0
720
Member Avatar for sum337

Hey ive tried to learn C++ by myself at home and decided that the best way to motivate myself was creating ye old dos text game. Im stuck at this so far and was wondering how can i improve my basic layout? also since its a text game how could …

Member Avatar for WaltP
0
3K
Member Avatar for vyrte

hello everyone! i have a question about reading from a binary file.what if i want to start reading a file from a certain line of the file and end the reading to a certain line too? is there a way to do this using an ifstream?

Member Avatar for WaltP
0
166
Member Avatar for Srinivas0

[CODE]#include <iostream> using namespace std; class LoopEx { int x,y; public: void Ex; { x=3; y=x; // y=3 while(y<=1) // 3<=1 y--; // 3, 2 x=x*y; // x= 3*3=9 cout<<x; } }; int main() { LoopEx F; F.LoopEx(); return 0; } [/CODE] im trying to write a program for factorial …

Member Avatar for Srinivas0
0
106
Member Avatar for Taino

Hi, I am trying to complete this application. just using a simple Array. I have most of the instructions down and included some additional stuff I thought was practical; it seems to work up to a point. I will continue to explain. These are the instructions: 13.13 ( Cafeteria Survey …

Member Avatar for WaltP
0
341
Member Avatar for midgarsorm

Hi I have a question how can you store data. for example i have a txt document stored this data Jones Jr, brown K. johnson, James S. Smith, Mark J. and i want to divide it to last name and first middle initial like i want to store it to …

Member Avatar for Clinton Portis
0
155
Member Avatar for LateNightCoder

In my program I read in a text file an decrypt the text from an array. once decrypted i then have to do through it again and search for every tenth array member and show their memory location. The code so far: [CODE] int main( ) { int* pCrypted = …

Member Avatar for LateNightCoder
0
348
Member Avatar for Semeno

Hi. I'm new in C++ and I need your help. I've got a structure and file in .csv format. It looks like this: [CODE]Twelve Monkeys;Sci-Fi / Thriller;USA;1995;129;Terry Gilliam;MUSIC;Bruce Willis, Madeleine Stowe, Brad Pitt; American Gangster;Drama;USA;2007;157;Ridley Scott;Marc Streitenfeld;Denzel Washington, Russell Crowe; Star Wars: Episode VI - Return of the Jedi;Sci-Fi / …

Member Avatar for NathanOliver
0
256
Member Avatar for iffrah

we are to input list of 2 types of scores both of double type.The scores are to be stored in a two-dimensional array. How do i do that?

Member Avatar for WaltP
0
162
Member Avatar for ConfusedLearner

Using a text editor (i.e. Notepad), create a text file called Text1.txt and place it into a folder of your choosing. Fill Text1.txt with a sentence and save the file. Then, write a C++ program that performs the following: 1. Reads the sentence from the file Text1.txt and display it …

Member Avatar for bboy_fresh
0
263
Member Avatar for cableworm

Hi. I have an array of structs problem. I am having issues with my getname getprice functions. I need to be able to enter a code and return the name and price for that item. The values I return are for all items. It looks like it should be simple …

Member Avatar for cableworm
0
166
Member Avatar for Zssffssz

I want my program to not rely excessively on external stuff as possible so could someone help/point me in the right direction to hand writing a .wav codec? Or whatever codec would be the easiest. Sorry I was gone so long, family.

0
101
Member Avatar for MyRedz

hi i am doing crc coding for c and cant get the remainder and dataword +remainder= codeword any help here [CODE] #include <stdio.h> #include<stdlib.h> #include <conio.h> int main() { int a[20],b[20],c[20],i,k,j,n,s=0,t=0; printf ( "Welcome to the CRC Encoder/Decoder!\n"); printf ( "press n to exit at anytimes\n"); /* do{*/ printf("enter size …

Member Avatar for sixstringartist
0
105
Member Avatar for siabenie

Hi all, I am new in C++, I wonder if anyone could assist me about create a two classes. Basically I need to create class scale and translate where these two classes are inheritance from transition class. In the scale class contain e.g Public: scale(); ~scale draw(); operator >>; same …

Member Avatar for siabenie
0
133

The End.