49,757 Topics

Member Avatar for
Member Avatar for mumar
Member Avatar for Anuradha Mandal
-3
71
Member Avatar for modesto916

Hi, I know that there are many topics about this, but, i read a lot of them, and no one solved my problem. I doing some exercises of the book "Deitel How to Program, 5", and in the exercise 4.27 i need to write a program that get a binary …

Member Avatar for modesto916
0
95
Member Avatar for BlueZephyr

I have a list of things of things I need my code to do but I don't know where to begin. I need to: -Read the first line of a file which gives the number of grades in a set. -Transfer everything in a input file to and output file …

Member Avatar for tkud
0
187
Member Avatar for baconswife

My program is supposed to open files, initialize variables, use the functions sumGrades, averageGrade and printResults. I am having some errors and was hoping someone could help me out. To begin with some errors I'm getting are: line 10- two few arguments to function 'void printResult(int, int, float, float, float, …

Member Avatar for VernonDozier
0
323
Member Avatar for Miyamoto

insertion into a set takes O(log n) time, which means ? I have heard about big O notation which desribes how memory usage changes when input changes. But log n ? n is probably the number for input values but i don't get it let's say i have 25 inputs …

Member Avatar for arkoenig
0
975
Member Avatar for VasquezPL

My menu function looks like this and it works great: [code] int menu(string * teksty, int ile) { static HANDLE h_we = GetStdHandle(STD_INPUT_HANDLE), h_wy = GetStdHandle(STD_OUTPUT_HANDLE); int wybor = 1; CONSOLE_CURSOR_INFO cci = {0}; GetConsoleCursorInfo(h_wy, &cci); cci.bVisible = false; SetConsoleCursorInfo(h_wy, &cci); COORD p = {0}; DWORD k; //FillConsoleOutputAttribute(h_wy, 0x07, 80 …

Member Avatar for VasquezPL
0
155
Member Avatar for learningcpp

Hi, I am new at CPP. I am trying to create a list using STL. I was looking at the pop_back() method, and it says that it delete the element from the list and also calls it's destructor. so myelement = list.back(); i can access it. list.pop_back() will delete the …

Member Avatar for Dakurels
0
129
Member Avatar for batchprogram

I recently made a switch to SDL as a cross platform alternative to directly accessing DirectX or OpenGL. In an attempt to port a section of my game framework, I encounter logic errors that (to me) make absolutely no sense. In this snippet, a sprite is simply a wrapper class …

Member Avatar for venomxxl
0
205
Member Avatar for Weird Nerd

Hi, I need some help with my C++ program. I've got these custom-made PlaySound(char[MAX_PATH]) and PlayMusic(char[MAX_PATH], bool) functions that use the BASS sound engine. When I call an instance of OPENFILENAME (found in the samples), the sound (.wav and .mp3) plays perfectly. My problem is that once the sound declared …

Member Avatar for Weird Nerd
0
324
Member Avatar for beatenbob

Hi all, I know this is a trivial question but I really got stuck. I keep getting "non-1value in assignment" when trying to access the pointer variable "next" using the getNext() function. It didn't show any error if I change the last 2 lines to [CODE] temp_ptr->next = after->next; //when …

Member Avatar for jonsca
0
368
Member Avatar for DaveJohnson

I need to learn how to create a bot and would deeply appreciate any help I can get. The bot needs to be able to do specific operations at the same time(s) each day: (1) Click on a button; (2) Click on another button; (3) Fill in specific values in …

Member Avatar for jonsca
0
155
Member Avatar for digan

Hi, i have to write a program that gets users to enter some numbers and it has to sort them in descending order. I've nearly finished but i just cant get it to sort in descending order, only ascending (using bubble sort). Here is the program: [CODE]#include <cstdlib> #include <iostream> …

Member Avatar for Anuradha Mandal
0
2K
Member Avatar for triumphost

KK the code below is a loop part of my main program I just cut it out and made it compilable.... This is the problem... When the user enters a number greater than 2, its supposed to tell them to retry because that was not in the options menu... that …

Member Avatar for WaltP
0
157
Member Avatar for Rez11

I'm having problems with the code from my text book. I need modify the class so it throws an exception instead. The problem is that I get errors from the original code from the book. Any help on how to fix it would be great. Thanks in advance! ERROR: [COLOR="Green"]Error …

Member Avatar for Rez11
0
1K
Member Avatar for frogboy77

Hey, i know this is a commonly asked question (and will probably get burned for asking it again) but wanted an up to date answer so here we go. I'm trying to learn to program in c++ purely as a hobby. I have recently spent some time doing problems at …

Member Avatar for gerard4143
0
220
Member Avatar for ChaosKnight11

So I started with C++ recently, and it's still very new and difficult for me but I think I'm starting to get the hang of it. Now I want to start making my first real-world app. I downloaded an SDK for a mobile application API and I want to make …

Member Avatar for Stefano Mtangoo
0
143
Member Avatar for shakssage

I can't think of a way to get rows out of a table. It was easy doing it with VB.Net and I'm just finding vc++ really difficult. This is what I have so far. I've connected to the database file and I am able to get the data shown onto …

Member Avatar for Stefano Mtangoo
0
259
Member Avatar for vbx_wx

Is there any diference between: [code] X* x = new X; X* y = operator new X; [/code]

Member Avatar for arkoenig
0
91
Member Avatar for baraah

hi how can i make program using for loops only that display the output below * * ** ** *** *** **** **** ***** ***** ***** ***** **** **** *** *** ** ** * *

Member Avatar for peter_budo
0
163
Member Avatar for BlueZephyr

I get this error: variable or field 'calc_score' declared void and I am pretty much stuck. Here is my code, it obviously isn't finished but I need to be able to get this void to compile to continue on. [CODE] #include <fstream> #include <iostream> #include <cstdlib> #include <iomanip> using namespace …

Member Avatar for packetpirate
0
207
Member Avatar for baltik08

problem: the user will input an integer for example 12345 (5 digits) and the output should be: 12345 12345 12345 12345 12345 // depending of how much digit you input or if the user will input lets say 123hi and the output should be 123hi 123hi 123hi // the program …

Member Avatar for Dhruv Gairola
0
792
Member Avatar for Lanor

Hi...I am not able to input text file correctly as desired...... data.txt -------- Jim A James A+ Smith Cathy D Dazy Peter C I am suppose to input the above file and fill the above data in two seperate arrays. For the second column, I am suppose fill NULL value …

Member Avatar for WaltP
0
97
Member Avatar for sairakhalid

i want to know whats the error over here. i just want to store the three value in a node and making a linked list but after storing two nodes that is headptr and than temptr, when the third node is made it stops. I think my error is somewhere …

Member Avatar for sairakhalid
0
174
Member Avatar for ana_1234

myint.h [CODE]#include <iostream> // so that we can overload << and >> using namespace std; class MyInt { // these overload starters are declared as friend functions friend MyInt operator+(const MyInt& f1, const MyInt& f2); //friend MyInt operator*(const MyInt& f1, const MyInt& f2); /*friend MyInt operator++(MyInt& f1, int); // postfix …

Member Avatar for ana_1234
0
394
Member Avatar for oggiemc

Hi guys, Just wondering how i would access a particular variable from an object in an array?? Consider the code: [code=c]void Animal::arrayDisplay(){ Animal ani; Animal* arry[3]; string n,c; int a; for(int i = 0; i<3; ++i){ cout <<"Input name:" <<endl ; cin>> n; cout <<"Input color:" <<endl ; cin>> c; …

Member Avatar for gerard4143
0
153
Member Avatar for samsons17

Hi all :) Recently i got a an assignment to be done which need to deal with c++ pointer.. This is the question : [B] Write a function that accepts a pointer to a C-string as its argument. The function should return the character that appears most frequently in the …

Member Avatar for samsons17
0
406
Member Avatar for HBK_100

I have the following in the txt file [CODE] 1 Single.Standard Standard Empty ......... ........ 70 2 Single Standard Empty ........ ....... 70 [/CODE] I ahve the code below buts its not deleting the selected id [CODE] while(!file.eof()) { file >> roomnumber >> category >> type >> status >> datein …

Member Avatar for HBK_100
0
101
Member Avatar for sairakhalid

How can i declare 2D array in visual C++ 6.0 as a member of class? this syntax of mine is giving error. class sparseadd { int *p; int row; int col }; sparseadd::sparseadd(int r, int c) { row = r; col = c; p = new int[r][c]; // here i …

Member Avatar for sairakhalid
0
129
Member Avatar for kuchick32

[code] #include <fstream> #include <iostream> #include <cstdlib> using namespace std; int main () { char out_file_name[15]; cout<<"Enter the name of your output file: "; cin>>out_file_name; ifstream input; ofstream output; cout<<"Begin editing files.\n"; input.open("Input.txt"); if (input.fail()) { cout<<"Input file opening failed.\n"; exit(1); } output.open("output.txt"); if(output.fail()) { cout<<"Output file opening failed.\n"; exit(1); …

Member Avatar for kuchick32
0
188
Member Avatar for jmcorpse

My main problem right now with this code is trying to get the carry function to work. Also, I know it isn't pretty code. Could someone help me in figuring out why this isn't working the way it is suppose to. The carry function is suppose to add the carry …

Member Avatar for Taywin
0
84

The End.