49,757 Topics

Member Avatar for
Member Avatar for azwraith69

i have a problem with curses my program is working properly, but when i include curses.h, it produces errors i can't understand.. [icode]classmates.erase(classmates.begin() + i);[/icode] and the error is: [COLOR="Red"]macro "erase" passed 1 arguments, but takes just 0[/COLOR] and [COLOR="Red"]statement cannot resolve address of overloaded function[/COLOR] if i remove curses.h, …

Member Avatar for azwraith69
0
194
Member Avatar for skitzo315

I need some help with Binary I/O. I know how to do it when I am specifying the filename in the code ie: [icode] fstream fio("persons.txt", ios::in | ios::out | ios::binary | ios::trunc); [/icode] What I need to know is how to open or create a file with a file …

Member Avatar for siddhant3s
0
264
Member Avatar for jeevsmyd

hey friends, here is a code that I made to find the prime numbers in an array.. What the program is supposed to do is check whether the number is PRIME or not.. The position of the element is specified and the program finds and check the element in that …

Member Avatar for jeevsmyd
0
118
Member Avatar for atman

Hello guys, I'm very green in c++ and just started to understand classes and objects. I'm reading on the web about this pointer, but having difficulties understanding how it works exactly, could aanybody please help me understand or reference a good article for total noobs in c++ to grasp the …

Member Avatar for siddhant3s
0
138
Member Avatar for halfnode

hi all pretty new to programming here the idea of the code is for the function to take in an string and an int and to pad the string with space on the left with the int being the number of space to put in. am i doing something wrong? …

Member Avatar for ArkM
1
178
Member Avatar for cassie_sanford

The problem that i am working asks to calculate a customer's monthly bill. The customer has to input their name, which package they purchased, and how many hours were used. For example package a is for 9.95 a month 10 hours of access provided. Additional hours are 2.00 per hour. …

Member Avatar for dvsConcept
1
198
Member Avatar for Himerz

Hi again people. I am stuck on this array that converts lower case letters to upper case letters. I need to find out how to make it not display strange characters after the letters are entered. I know it has something to do with the 'null' terminator, but I am …

Member Avatar for zalezog
0
138
Member Avatar for Carmen Smith

I am having trouble with the remove() function in this avl class. When I run the test below in my main my debugger tells me "there is are not enough frames in stack" pointing to the line [code]t->height = max( height( t->left ), height( t->right ) ) + 1; [/code] …

0
50
Member Avatar for minime2100

Hello, I'm currently taking a programming class in college for my first time and I am having a hard time with my assignment for the week. I have to write a program that I create a class called Student. It will then have two members within the private sector called …

Member Avatar for minime2100
0
92
Member Avatar for rafkay

Hi .. anyone can help me out to solve this problem... coding to read the file... 1. this coding is well working... can list down all the data in dataM.txt [CODE]ifstream OpenFile("D:\\dataM.txt"); int a; if(!OpenFile) { cout << "While opening a file an error is encountered" << endl; } else …

Member Avatar for vmanes
0
216
Member Avatar for rafkay

hi all, when i run this code (quick sort), i ll get ascending order as output... now i want descending order instead... anybody know how to altert this code..uhuhuh [CODE]void QuickSorting::sort(int a[], int lo, int up) { { int i, j, pivot; while ( up>lo ) { i = lo; …

Member Avatar for rafkay
0
2K
Member Avatar for Brandon515

[CODE]int write() { system("cls"); char text[2000]; char thing[100]; cout << "which file would you like to write to?"; cin.getline (thing, 100); cout << "what would you like to write? (up to two thousand characters)"; cin.getline (text, 20000); ofstream file; file.open(thing); file<<text; file.close(); system("pause"); return haha(); }[/CODE] ok so I'm writing …

Member Avatar for death_oclock
0
102
Member Avatar for Se7Olutionyg

[CODE]#include <iostream> using namespace std; #include <iomanip> #include <cstdlib> enum RequestType { ZERO_BALANCE = 1 , CREDIT_BALANCE, DEBIT_BALANCE,END} int getRequest(); bool shouldDisplay ( int, double); void outputLine ( int, const char*const, double); int main () { ifstream inClientFile( "clients.txt", ios::in); if ( !inClientFile) { cerr << " File could not …

Member Avatar for Se7Olutionyg
0
138
Member Avatar for tones1986

hi all. in a recent project i created a linked list to store a students course data...such as course ID, year taken, semester taken, and final grade. This program worked without any problems. now, my next project is to create a stack to store the data, instead of a linked …

Member Avatar for Murtan
0
154
Member Avatar for pdwivedi

hi can anybody please expalin me that can i access the array(arr) which is declared as a private member of the class(array) by using public function (display). The code is given here... [CODE=c++]#include<iostream.h> const int size= 8; class array { int arr[size]; int i; public: array(); void display(int arr[size]); }; …

Member Avatar for Salem
0
111
Member Avatar for Se7Olutionyg

[CODE]#include <iostream> using namespace std; #include <string> class Engine { int power; public: Engine() {power=0;}; Engine (int pIn) { power = pIn;}; void show (); float getPower () {return power;}; }; void Engine::show() { cout << " This is an engine have a power of " << power << " …

Member Avatar for iamthwee
0
137
Member Avatar for rudasi

Hello I want to write a program in c++ to convert certain rows which i can choose from a table in excel to .csv. Anyone done anything similar? I am not sure how to do this, still thinking, any suggestions.

Member Avatar for marco93
0
204
Member Avatar for C++.java

// days in a given month.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char month,january,feburary,march,april,may,june,july,august,september,october,novemb er,december; cout<< "\nEnter january,feburary,march,april,may,june,july,august,september,october,november,dec ember : "; cin>>month; switch(month) { case january: cout<< "31\n"; break; case feburary: cout<< "28\n"; …

Member Avatar for ArkM
0
109
Member Avatar for SHWOO

This function is supposed to open a file stream and copy the text into an integer array to be used for a map key. Here is the contents of the file. I am getting the decimal value stored in the array and I just cannot figure out how to correct …

Member Avatar for WaltP
0
76
Member Avatar for dvsConcept

i have this program generating 3 numbers and i don't know how to take those 3 numbers (i.e. 777) and applying that to a switch/case like... [code=c++] switch(landing) { case 'a'://777 //calculation will go here break; case 'b'://666 //calculation will go here break; ///and so on and so on! } …

0
67
Member Avatar for mushbucket

Heya, I'm trying to slim down some code by using a for loop, but the only way I can do it is by building a variable string to put in the format bit. [CODE=C++]for (n=0; n<13; n++) { strTmp.Format("%ld", pFrame->m_pAppWnd->state.Variable); strBuf.Replace(saveloadtypes[n], strTmp); }[/CODE] pFrame->m_pAppWnd->state.Variable fetches strings from another .cpp file. …

Member Avatar for mushbucket
0
200
Member Avatar for obsy

Hi! I made a visual c++ application. My problem is how do I run the program in the console. And the program should read the data from sample.txt file

Member Avatar for obsy
0
98
Member Avatar for Linking_90

Hi, I was hoping that someone could give me some direction with how to solve this probem. The only info in this problem is word has N digits[only digits] and each digit in the word is in increasing order example 1469 or 362 I have to verify if the number …

Member Avatar for Linking_90
0
141
Member Avatar for nitu_thakkar

hello everone i'm new to c++ language Is This possible to make prg in cpp to overload () Opratore if yes, then can u pls give any logical flow for develope the prg i.e. which kind of opeartion can be performed through () opratore thanx in advance

Member Avatar for Narue
0
80
Member Avatar for jaison.steephen

how to add graphics library to Turboc++5.0 so as to run functions like circle(x,y,r); I am using XP sevice pack2. Plz help me. thanks in advance

Member Avatar for daviddoria
0
50
Member Avatar for Emerald214

I get the size of the integer array by using sizeof operator but the problem is: + Outside class: It outputs 3 (correct) + Inside class: It outputs 1 (incorrect) So how to fix it? Thanks [CODE]class A { public: A(const int a[]); }; A::A(const int a[]) { cout << …

Member Avatar for Emerald214
0
145
Member Avatar for weasel7711

I am writing an implementation of a DES encryption with a 64 bit plaintext, taken from the pixel information in a BMP file. So I want to skip the header which is 54 bytes, but I am not sure how to do this. This will not be a dynamic project, …

Member Avatar for nucleon
0
305
Member Avatar for halfnode

hi all its me again, i just added a replace function but its throwing error C2661: 'std::basic_string<_Elem,_Traits,_Ax>::replace' : no overloaded function takes 2 arguments. any idea? [CODE] #include <iostream> #include <string> using namespace std; string padBlanks(string, int); void removeLetter(string&, char); int main() { string string1; int padN; string inStr; char …

Member Avatar for Nick Evan
0
115
Member Avatar for cproud21

Why is this array not printing in 2D? [ICODE]#include <iostream> #include <iomanip> using namespace std; const int COLS = 5; const int ROWS = 5; void showArray(int [][COLS], int); void arrayDef(int [][COLS], int); void totalCol(int [][COLS], int); void totalRow(int [][COLS], int); void totalDiag(int [][COLS], int); void inputAmt(int [][COLS], int, int, …

Member Avatar for Clockowl
0
91
Member Avatar for dcawley

I'm new and I don't want to waste anyone's time, but I searched and found nothing on this. I am to write a simple CRC-16 routine. My compiler (microsoft) will not accept a char[] as an operand when I try to execute the xor. char msg[5] = {'A','B','C'}; int generator …

Member Avatar for Nick Evan
0
184

The End.