51,593 Topics

Member Avatar for
Member Avatar for chamnab

Hi everybody !! I would like to ask you some question about C++: 1.what is the best program that can write C++ more easily? 2.Can you output C++ in different language beside English ? 3.if everybody know pls tell me . 4.do you know some useful website for C++ because …

Member Avatar for Ancient Dragon
0
189
Member Avatar for Bigbrain99

Is there any way to check if i have added more than 1 same header so that i won't get compiling error while running it?How do i know which one will include the header first and other cpp will include it later?

Member Avatar for Bigbrain99
0
90
Member Avatar for mimis

Hi, I have to create a set of structs but i don't know how because it needs to check the equality between them. For example: [CODE] struct something{ int x,y; string word; }; set<something> s; [/CODE] Can you help me?

Member Avatar for mrnutty
0
164
Member Avatar for Eager Student

Hi! to everyone I'm starting out in programming,I need a pseudocode or flowcharting to use to help me get started on coding. Often, when I take a look at a coding assignment, it looks daunting, and it's hard to figure out exactly where to start. Especially with all of that …

Member Avatar for diannetots
0
283
Member Avatar for jackandjill2010

Hi i have a simple question i was wondering how to display the existing data in C# objects like Textbox, combobox or labels. At the moment a sql database file, one of the tables data is currently displayed in the datagridview control just fine. But what i would like to …

Member Avatar for jackandjill2010
0
390
Member Avatar for oscarp

Hi, I have a map of a base class object (not pointer to objects). I did this because I need to have inheritance from others types like this: Parameter RealParameter: Parameter IntParameter: Parameter ... My problem is that when I am going to insert in the map, copy constructur of …

Member Avatar for mike_2000_17
0
2K
Member Avatar for ontherocks

I find the concepts in pointers to an array very confusing in the context of using them in functions. Here in this case I am trying to get a whole array from a function. The whole array is generated within the function. Obviously my code is hopelessly nonsensical. [CODE]#include <iostream> …

Member Avatar for ontherocks
0
129
Member Avatar for aikiart7

Hello, I'm trying to understand linked list but i'm having problems with the way my text describes one aspect. This is the problem i'm having: The text says: //If there are no nodes in the list make newNode the first node and then test it like this: head =NULL; if …

Member Avatar for aikiart7
0
108
Member Avatar for megz_03

Hello! I need help with this program.. Me and my friend are working on a simple inventory system. The program works well, but we don't know how to retrieve the and delete the data that we inputed. Thanks for helping! Here's our code: [CODE]#include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> #include<string.h> #include<dos.h> #include<stdlib.h> …

Member Avatar for Ancient Dragon
0
252
Member Avatar for vandadm

Hello all, For this program (assignment), the user enters the names of five students, and their respective four test scores. The program will then average the scores, and display them for the user. Part of the requirement for the program is that we use five single-dimensional arrays of 'doubles' to …

Member Avatar for tesuji
0
211
Member Avatar for mauro21pl

Hi to all. Could you guys help me with a little program. There is something wrong with tahat and can't find that. That's the code: [code=c] /* An employee is paid at rate of 16.78$ per hour for the first 40 hours worked in a week. Any hours over that …

Member Avatar for gacha23
0
880
Member Avatar for nhidman

Is anyone knowledgeable enough to help 'bout the scrambling of voice?

Member Avatar for daviddoria
0
66
Member Avatar for xavier666

Okay this program is really pissing me off! After line 95, the member variable is suddenly getting changed (That is, the 2nd string). Even after looking at it for 3 hours, I've failed to crack it :( Please help me out guys! [CODE] # include <iostream> # include <cstring> using …

Member Avatar for xavier666
0
146
Member Avatar for DamienCurr

Good evening! I am currently working with a program that does basic arithmetic with polynomials that can have rational coefficients. I was able to come up with seperate classes and implementation files for my two classes, Polynomial.h and Rational.h. I can run two different programs, one for each class, fine. …

Member Avatar for StuXYZ
0
1K
Member Avatar for TheWolverine

Hi all, My title might not describe this problem as well as it could, but I'm not sure what area this problem falls under. I have a simple base class and derived class as follows: [CODE] class BaseClass { public: BaseClass() { parameterA_ = -0.0; parameterB_ = -0.0; } virtual …

Member Avatar for mrnutty
0
76
Member Avatar for aikiart7

Good afternoon, i'm getting an error when I compile "undefined reference to 'TestScores:theAverage(int *,int)" I'm not sure what the compiler is telling me. Any assistance is welcomed. Art header // this is the header file for class TestScores #ifndef TESTSCORES_H #define TESTSCORES_H //this idea with this class is to take …

Member Avatar for aikiart7
0
223
Member Avatar for Nathaniel10

I am learning C++ from the Stroustrup book "Programming Principles and Practice". I have been doing the exercises in each chapter. I have gotten stuck on chapter 6. I understand the concepts of classes, constructors, functions, and 'throw and catch' error handling, but seemingly not well enough to actually write …

Member Avatar for Nathaniel10
2
141
Member Avatar for mike42intn

I am writing this program for class and it compiles fine but when i debug it it gives me an assertion failure any suggestions would be welcomed i need it to output 20 random sentences. [CODE]#include "stdafx.h" #include <iostream> #include <cstdlib> #include <ctime> #include <cctype> using namespace std; const char …

Member Avatar for mike42intn
0
232
Member Avatar for jasleen12345

i have a program in which i have to input 2 2-d arrays and then compare the elements of both. executing for loop again and again is making the program long. can i make it short. can we pass an array into a function?

Member Avatar for dusktreader
0
86
Member Avatar for ontherocks

I have a code wherein I pass a whole array to a function. Is it possible to do exactly the same thing using pointers? [CODE]#include <iostream> using namespace std; void func(int array[]); int main() { int array[] = {10,20,30,40}; func(array); cin.get(); return 0; } void func(int array[]) { cout << …

Member Avatar for ontherocks
0
158
Member Avatar for chaienbungbu

I've done an example of 'template specialization'. Here is the code: [code] // template specialization #include <iostream> using namespace std; // class template: template <class T> class mycontainer { private: T element; public: // only prototype mycontainer (T); T increase (); }; // class method definition template <class T> mycontainer<T> …

Member Avatar for major_tom3
0
236
Member Avatar for ChaseRLewis

Wanting to create an error handling function, I want it to return the line without having to pass an int value for it. I've seen functions given to me in books and so forth do it, but I have no idea how to get that value.

Member Avatar for ChaseRLewis
0
128
Member Avatar for rachmar

HELP PLS WITH MY Project i am a beginner in programming pls help me . read the machine problems plssss>> any body>> thank you

Member Avatar for Fbody
-3
30
Member Avatar for lil.jeantle
Member Avatar for ftl25

Hi, I have a structure defined in my header file as follows: [CODE] struct TestInformation { int TestPointer; // pointer to the selected test long TestPointerValue; // the value contained within the pointer long TestSize; // the size of a test char *TestText; // the text contained within a test …

Member Avatar for ftl25
0
287
Member Avatar for jasleen12345

hi i am new to c++...i have a learnt a lot about the basics. i now want to procede to the graphics part. i dont know even a little bit of the graphics part....pls help me.. i am using dev C++

Member Avatar for jasleen12345
0
215
Member Avatar for enkidu75

So I have a program I need to make which involves an array. It builds fine and runs. Right now I just need to get the array to read in from file then print it on screen. But only a little over half the array prints (the last half). format …

Member Avatar for daviddoria
0
110
Member Avatar for yosi_s85

i get non accuracy result for using simple(* + -) and complex(sin cos pow) math function in std. someone know very accuracy for math actions?

Member Avatar for mike_2000_17
0
204
Member Avatar for helpme87

i want to be able to read input from a file and find like entries and then add the corresponding data. i dont know if i explained that well so ill give an example... the file would be like this (just example numbers)... [CODE] 111111 15 222222 6 111111 4 …

Member Avatar for helpme87
0
133
Member Avatar for DragonMasterJay

Hi I was looking for some ideas and techniques on developing an antivirus engine. Not really sure how the code should go, or how the program will scan the system. Please state any ideas, or ways to approach the engine development. Thanks.

Member Avatar for dannyfiker
0
341
Member Avatar for joboski
Member Avatar for mavs123
Member Avatar for daviddoria
-1
111
Member Avatar for fire_

Hello. I'm writing program wich reads from file line by line and then rewrites everything to other file. This is simplifyied part of code: [CODE]for (int i=0; i<=5;) { getline (file1, str1); /* file1 is file from wich i read and str1 is string*/ file << str1; }[/CODE] No i'm …

Member Avatar for Ancient Dragon
0
275
Member Avatar for jeevsmyd

I have been advised by many people that it is better to use integer return type for main function instead of void ! I actually dont understand what return 0 means .. main returns 0 value to program ! What does that mean ?! Could you please help me understand …

Member Avatar for Ancient Dragon
0
164
Member Avatar for Rez11

I'm getting weird letters and numbers when the array is being shown. What is the problem? I've initialized array1 with 10,20,...etc. So shouldn't it cout those numbers? [CODE] #include <iostream> using namespace std; void reverseArray(int[], int); int main() {//start main const int size = 5; //constant size of array is …

Member Avatar for Fbody
0
128
Member Avatar for Prashanth.claw

I'm new to work on image processing using c++, well someone suggested me to use cimg library. i downloaded it and now i'm not getting how to work in turbo c using this library. i added cimg header file to turbo c header files.but its not working... can any one …

Member Avatar for Stefano Mtangoo
0
36
Member Avatar for ganesh_IT

Hi guys, i want to read a file backward using iterator pls any explain me with sample code

Member Avatar for Topi Ojala
0
52
Member Avatar for kazkikay12
Member Avatar for Topi Ojala
0
77
Member Avatar for Bigbrain99

[CODE]#include <iostream> #include <string> #include <ctype.h> using namespace std; void isphone(int number) { bool isphone = false; int size2= number.size(); for (int i=0; i<size2; i++) { if(isdigit(number[i])&& size2>=4) { isphone=true; } else isphone = false; if(isphone=true) { cout<<"yes this is a phone number"<<endl; } else cout<<"Invalid number!"<<endl; } } //for …

Member Avatar for Bigbrain99
0
156
Member Avatar for khrizanne

is there someone who can help me? i need a c++ program of any sales system. badly need it. asap ! for my case study any1 there willing to help. thnks a lot guys !

-1
31
Member Avatar for jheichimiste

I am currently assigned to teach programming subjects for college students... however, I am not a computer science major, I just knew some programming, can you help me in coming up with a credible, and standard series of topics to be discussed?

Member Avatar for Stefano Mtangoo
0
104
Member Avatar for Stefano Mtangoo

Hi anyone who knows good and documented CHM library? There is [URL="http://www.jedrea.com/chmlib/"]chmlib [/URL]which is X-platform but I cant find documentation or example. Is it hard to write cross platform CHM reader library. Just reading, no writting Thanks

0
52
Member Avatar for umesh314

Please help me....... I want to buy a book for C++... i want your suggestion for this..... i am confused... HELP.....

Member Avatar for umesh314
0
157
Member Avatar for onako

My current c++ application is compiled by calling "make", and invoked by calling "./fileName.bin". Now, I want to add the functionality of cairo library into the application. Note that the the program written specifically for testing cairo (outside my application) is compiled by "g++ -o fileX $(pkg-config --cflags --libs cairo) …

Member Avatar for Stefano Mtangoo
0
141
Member Avatar for vbx_wx
Member Avatar for smcguffee

Hi all, I'm gradually starting to make this transition from the world of C to C++, and now that I have a little progress, I have some things that are still a bit confusing to me. One of them is if I nest a class inside another class. If I'm …

Member Avatar for smcguffee
0
121
Member Avatar for n.aggel

In order to traverse a tree you could use something like this: [B]For inorder traversal:[/B] [CODE=C++] inorder(TreeNode* currentNode) { if (currentNode) { inorder(currentNode->LeftChild); cout << currentNode->data; inorder(currentNode->RightChild); } } [/CODE] [B]For preorder traversal:[/B] [CODE=C++] preorder(TreeNode* currentNode) { if (currentNode) { cout << currentNode->data; preorder(currentNode->LeftChild); preorder(currentNode->RightChild); } } [/CODE] [B]For post …

Member Avatar for jbel
0
423
Member Avatar for Rez11

I am trying to write a program that takes a user submitted number of test, along with the test scores. Then I need to sort them in ascending order. (I've done all this). Now I need to get the average, but my getAvg function drops will drop the decimal and …

Member Avatar for dusktreader
0
210
Member Avatar for shahanakazi

Hi. Can anyone help me get started with the following program please? I know the concept but i am having problem writing the syntax codes. I know we have to use arrays and then split the array and convert it into string and then back to integer. I believe we …

Member Avatar for dusktreader
-1
174
Member Avatar for Loadstone

(This is a repeat post from C# section since I just found this section and thought it might apply.) Hi guys, First I want to apologize for such a lengthy post. I'm attempting to give as much information as I can, and I'm sure I'm leaving something important out anyway. …

Member Avatar for Loadstone
0
326

The End.