49,760 Topics

Member Avatar for
Member Avatar for sireiz

I want to know how this function is working. I used qsort() function to sort the integers in an array and i found this compare() function on internet. It worked perfectly well but i cannot understand how is it working and what's its logic. Any help? int compare (const void …

Member Avatar for sepp2k
0
2K
Member Avatar for amirul_1

Hellow...How to count and sum even and odd integers from a sequence of integers..?

Member Avatar for MandrewP
0
116
Member Avatar for winky

[LIST=1] [/LIST]Hello again :), I am writing a code that will recursively write a string in reverse. The problem is in my recursiveReverse function. I feel like the idea is right, but the implementation is incorrect. My thought process was that I could start the loops at the beginning and …

Member Avatar for Joshua_3
0
1K
Member Avatar for Sam R.

This is a code for removing spaces from a string, I've been asked to do this without using any standard library functions like `isspace` or `'\b'`. I've been trying for a lot of time but it always gives the same error > Error : Cannot convert 'char' to "char *" …

Member Avatar for MasterHacker110
0
5K
Member Avatar for azurekite

PROBLEM DESCRIPTION A battalion is a military unit with 300 to 1200 soldiers usually consisting of seven companies commanded either by a lieutenant colonel or a colonel. A particular training that a battalion undergoes is the training to maximize the battalion's "carrying capacity" whenever they are to carry cargoes from …

Member Avatar for azurekite
0
133
Member Avatar for andrew.mendonca.967

Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are no real roots, to another text file. The coefficients of a quadratic are the a, b and c of an expression of …

0
108
Member Avatar for Abo0od

class name { char *s; int len; public: name(){ // Default constr. s=NULL; len =0; } //************************************************** ~name(){ // Destruct. if (s!=NULL){ delete [] s; s=NULL; } } //************************************************* name(const char * s1); // Constr. char* getName(); //fcn get name int getLen() ; // fcn get lenght void setName(const char …

Member Avatar for Moschops
0
261
Member Avatar for phorce

I'm working on a project that generates roughly between 13x512 values in which I compare at run-time. So the program outflow will be sort of as follows: - Program executes - Extracts (1) 12x512 - Extracts (2) 12x512 - Compares (1) to (2) - Extract (3) - Compares (3) to …

Member Avatar for Moschops
0
221
Member Avatar for daniel1977

Dear Friends: I need some help to identify the error. When I compile my application I get the following error message: Error 1 error C2678: binary '==' : no operator found which takes a left-hand operand of type 'extPersonType' (or there is no acceptable conversion) f:\college material\cs270\sourcecode\addressbook\addressbook\arrayListType.h 251 1 AddressBook …

Member Avatar for daniel1977
0
358
Member Avatar for Olagsfark

Please i got a problem linking my .cpp files together in my c++ project. I dnt knw how to specify the file path for #include . Please any help?

Member Avatar for phorce
0
215
Member Avatar for manel1989

Hi everyone! I would like to know how to show my Form21 from a click on a button in Form1 I used this code here: #include "Form21.h" /// Form21 ^maForm2 = gcnew Form21(); maForm21->Show(); I do not know why it does not work yet I found it in FAQC + …

Member Avatar for ddanbe
0
290
Member Avatar for microlifecc

I wish to store an integer wid a 1000 digits for a program in C++.Please suggest me a datatype i should use.I'm using a 64 bit computer but the dev c++ i'm using is 32 bit.

Member Avatar for Moschops
0
248
Member Avatar for manel1989

Hi everyone! I have a datagridview and I want to automatically fill it Let me explain: I have a matrix (gainMatrix) and I want to fill my datagridview by the latter, here is a piece of code that I use for filling: for (int i =0; i <ala.size(); i++ ) …

0
141
Member Avatar for ovalaukido

how do we build our own string functions from scratch and not use the built in functions from the String class and a function to open and close a file given its name. then, check whether or not the file exists. It should read an opened file into an array …

Member Avatar for Ancient Dragon
0
151
Member Avatar for Mr.Sagr

Hey, I want to EnumProcess , Then HANDLE with exactly process to read the memory of it any help?

Member Avatar for Ancient Dragon
0
134
Member Avatar for every1play

Hi guys, I am creating a 2D casual game and i encounter a problem. The problem is that I have a highscore features that saves to a text file by storing the name and score Now i wanted it to sort using bubblesort and structures. How can i achieve that? …

Member Avatar for rubberman
0
270
Member Avatar for John_Tee

I was just introduced to a topic of arrays but i just want you to kindly give me an intoroduction to ARRAYS,what are arrays/

Member Avatar for aVar++
0
83
Member Avatar for gaurav23

#include<fstream.h> #include<conio.h> #include<string.h> #include<stdio.h> void main() { clrscr(); ofstream fout("a"); fout<<5<<"\n"<<3<<"\n"<<2<<"\n"<<4<<"\n"<<1; fout.close(); ifstream fin("a"); int i,j,k,l=0,m,n,o; while(fin) { fin>>i; l++; } l--; fin.close(); fstream fin1("a",ios::ate,ios::in); fin1.seekg(0); for(i=0;i<l-1;i++) { for(j=0;j<l-i-1;j++) { o=fin.tellg(); fin1>>m; fin1>>n; if(m>n) { fin1.seekg(o); fin1<<n; fin1<<m; fin1.seekg(o+1); } } } } //file sorting is not working if anyone …

Member Avatar for gaurav23
0
222
Member Avatar for daniel.leowteckleong

**Problem Statement** During the tax season, L&T Accounting Firm provides assistance to people who want to prepare their own tax returns. The company only services personal (individual) taxpayers. Your task is to write a program to do the tax calculation for each of the personal clients. Your program should get …

Member Avatar for bradly.spicer
0
305
Member Avatar for andrew.mendonca.967

Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are no real roots, to another text file. The coefficients of a quadratic are the a, b and c of an expression of …

Member Avatar for nitin1
0
183
Member Avatar for ProDev7

Hello guys could anyone explain what is the point in: #define DEBUG and #define NDEBUG? when should we use them and how?? I'd like to see some examples any help is highly appreciated

Member Avatar for ProDev7
0
204
Member Avatar for willscarlet

Hi guys, im new to these forums and new to C++. I love games (mainly RPG's) so I figured I would learn C++ by making a little text based RPG. Anyways, I read through a few tutorials and an olc C++ for dummies book and this is what I cam …

Member Avatar for XtrmJosh
0
613
Member Avatar for nikzer

**hi! i need help on fixing this program i made it seems that i can't let it run. Can someone give me some advice on what errors i have made and how i can fix it. thanks ** #include <iostream.h> #include <conio.h> void main () { int i; int j; …

Member Avatar for NathanOliver
0
216
Member Avatar for tlangelani

write a program that simulates the energy use of a house hold based on mainly the geyser's energy consumption. This is the first in a series of assignments improving on the model for this simulation. As a simple model the yearly consumption is based on a sinusoidal function approximating annual …

Member Avatar for rubberman
0
134
Member Avatar for nirbilcahn

http://ideone.com/H7YIwR Here's my code to find palindrome in string..But surely it's too slow..Is there any good algorithms for such problems..And for some cases it's not giving the right answer.Thanks for the help.

Member Avatar for vijayan121
0
407
Member Avatar for nitin1

Actually, I have learnt C++ much till now . Atleast which i need for my work purposes. I have thought of a project-- desktop calculator. I want to have all these functionalities in it. 1. mathematical functions, 2. prime number checker(will apply primality checking algos), 3. all error handlers (zero …

Member Avatar for Labdabeta
-1
191
Member Avatar for Simon180

I get the following errors with my code when using nmake input.c(375) : error C2065: 'ulong' : undeclared identifier input.c(375) : error C2146: syntax error : missing ';' before identifier 'datelo' input.c(375) : error C2065: 'datelo' : undeclared identifier input.c(376) : error C2146: syntax error : missing ';' before identifier …

Member Avatar for RonalBertogi
0
939
Member Avatar for torrm

Hello all, It has been a while but I'm on the right path - finally. So basically I am writing a very special application for a loved one. I have many great ideas but simply put I am struggling with I/O stream, it is very possible that I should research …

Member Avatar for rubberman
0
158
Member Avatar for Mantroskylo

This is an assingment i've been working on but since this is a merge between two previous developments i need a little help solving my issue here that would be highly appreciated. In a nutshell what this program needs to do is recieve a .txt file create a vector holding …

Member Avatar for rubberman
0
289
Member Avatar for nattu

Can u plx help me to display the score with each correct answer in Jumble word game in C++ and Gwin here is so far upto where i have gone #include"gwin.h" #include <iostream> #include <string> #include <fstream> #include <time.h> using namespace std; using namespace GwinColourNames; int main() { GWindow Gwin(500,400); …

Member Avatar for np complete
0
532

The End.