49,757 Topics

Member Avatar for
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
138
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
229
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
83
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
153
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
231
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
123
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
267
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
205
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
107
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
198
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
127
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
331
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
271
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
159
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
127
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
50
Member Avatar for kazkikay12
Member Avatar for Topi Ojala
0
74
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
152
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
30
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
88
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
49
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
154
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
137
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
120

The End.