49,766 Topics
![]() | |
What is the best and efficient way of redirecting streams from a parent process to child process. There are a number of ways i found out like boost.process, fork() and createprocess(). But what is the best way for windows? | |
How to apply graphics in Microsoft Visual Studio C++ Express 2012? | |
#include <cstdlib> #include <conio.h> #include <iostream> #include <stdlib.h> using namespace std; int main(int argc, char *argv[]) { int x,ctr; cout<< "Enter a day: "; cin>> x; for (ctr=x;x>0;x--) for (ctr=1;ctr<=12;ctr++) { switch (x) { case 1:cout<< "On the first day of Christmas\nMy true love sent to me...\n"; break; case 2:cout<< … | |
I want to calculate the formula in C++ program. Put all 5 formula inside the program but just run 1 formula only. For example, run the current ratio formula only. If you want another formula then just adjust the coding. Then the second formula will run. Just adjust inside only. … | |
hello; how to access to a control of a form from another form? example datagridview | |
Hello everybody. I am seeking help on how to save 3 output images into a specific path after filter by 3 different mask size e.g. 3x3, 5x5 and 7x7 mask. My program is in C:\Cpp\Project\, I wish to save those output images inside "filter" folder with path in C:\Cpp\Project\filter. Thus, … | |
Inline Code Example HereHi guys, below is a function which converts ebcdic to ascii and it works for a buffer, i need to modify it in accordance to a file,which i am unable to do as i am not very good with C, tried my luck everywhere but did not … | |
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 … | |
Hellow...How to count and sum even and odd integers from a sequence of integers..? | |
[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 … | |
![]() | 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 *" … |
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 … | |
![]() | 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 … |
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 … | |
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 … | |
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 … | |
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? | |
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 + … | |
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. | |
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++ ) … | |
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 … | |
Hey, I want to EnumProcess , Then HANDLE with exactly process to read the memory of it any help? | |
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? … | |
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/ | |
#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 … | |
**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 … | |
![]() | 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 … |
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 | |
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 … | |
**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; … |
The End.