49,757 Topics

Member Avatar for
Member Avatar for Sohelp

Hi all, It is my first post in this forum.So plz help me, to continue. I face some problem about class function. How i use a function value to another function. Anybody knows how to solve this problem, plz help me. Thank's Sohel Rana

Member Avatar for Fbody
0
113
Member Avatar for ChainedHollow

I am needing to edit this client/server echo program into a client/server talk application, to send messages back and forth between the client and server, rather than have the client echo the message only. So the output would be: C: Hello S: Hello S: How are you? C: How are …

0
42
Member Avatar for globberbob

Hi there, im new to the site and am hoping someone out there can help me with my question, im pretty newbie in the world of c++ and programming in general. Im making a program with a menu, you can choose between entering a number yourself to be tested as …

Member Avatar for globberbob
0
320
Member Avatar for mrar85

Hello, i'm a newbie with c++.. all help and explanation are welcome..my problem is, i try to make a factorial program in c++ . Here is my code: [CODE]#include <iostream> using namespace std; int main() { int a,b,fact=1; char key; do { cout<<"\nPlease enter a positive integer : "; cin>>b; …

Member Avatar for mrar85
0
2K
Member Avatar for dicas3d

I have this program [url]http://ostermiller.org/qqwing/qqwing.cpp.html[/url] I need run the program by code with parameters to do somehtin on interface. So how i load the data that i need to my program without change it. Note: I want make a program based on it [url]http://ostermiller.org/qqwing/qqwing.cpp.html[/url].

Member Avatar for dicas3d
0
150
Member Avatar for mitrious

Here's what the book asked [B]The implementation of nrand in ยง7.4.4/135 will not work for arguments greater than RAND_MAX. Usually, this restriction is no problem, because RAND_MAX is often the largest possible integer anyway. Nevertheless, there are implementations under which RAND_MAX is much smaller than the largest possible integer. For …

Member Avatar for mitrious
0
104
Member Avatar for tech9x

i got a .txt file that contain data, and i would like to read from the file and then write the data to another file, is it about ifstream and ofstream?.. what i have done is just open the input file and open the output file :(( how to relate …

Member Avatar for vijayan121
0
4K
Member Avatar for Orangeweapons

Hi, this is my first C++ forum post. I'm having issues with including the library libcurl [U](found [URL="http://curl.haxx.se"]here[/URL])[/U]. I want to include it in my project so I can start working with it, because a friend of mine showed me just how powerful the library is. These are my specs: …

Member Avatar for vijayan121
0
255
Member Avatar for Tedius

Design a class for perform the following (without using any library function for string manipulation) Read a string (containing words and spacing characters) Find out the longest word in the string Compare two strings Find out the longest common sub string(word) of the two string Display a string

Member Avatar for tkud
0
103
Member Avatar for vijaykrishnabor
Member Avatar for mike_2000_17
0
130
Member Avatar for akshayabc

Plz answer my these C doubts- Q. 1- If i have 3 source files and i declare a static variable in the source file s2.c then which statement is true:- That static variable is created when the program starts executing and is destroyed when the whole program finishes executing. OR …

Member Avatar for gayathri balu
0
175
Member Avatar for vijaykrishnabor

Hi is it possible to have recursive function as inline function ? this was question asked interview please help me

Member Avatar for mike_2000_17
0
2K
Member Avatar for Tellalca

Hello, I really wonder that is it possible to open any file and play with the data inside it using C/C++ FILE pointer. I'm taking a lecture called Data Management and File Structures and there we are working with text and binary files. So I decided to research and work …

Member Avatar for Ancient Dragon
0
158
Member Avatar for heidik

[code]breachmonitor.cpp:(.text+0x17ce): undefined reference to `BreachMonitor::Breach::Breach()'[/code] Can anyone please tell me what does it mean? I have created a struct and then declared its variable like [code] Breach wb; [/code] and it isnt compiling. The structure has default constructor (no arguments) and another one for initialization. It has also got two …

Member Avatar for heidik
0
192
Member Avatar for alwaysLearning0

This is just for fun and to see how people do it, it will help me to learn different techniques also. If no one answers i will understand. :) Lets say you have a template class. You want a certain method of this class will have some sort of checking …

Member Avatar for mike_2000_17
0
182
Member Avatar for BarnacleBoy

Hey everybody, I need to send the output data from a .cpp file to a .csv file so that I can import it into excel for further work. I was reading some stuff online, but I was getting confused. I need the data in the .csv file to look like: …

Member Avatar for BarnacleBoy
0
74
Member Avatar for mitrious

I'm studying the Accelerated C++ book in the 7th chapter it teaches how to create random sentences from an input that goes like this words between brackets work as categories and <sentence> is the category that defines how the sentence will be organized example: I enter the lines: <sentence> the …

Member Avatar for mitrious
0
167
Member Avatar for heidik

Could somebody please tell me how do I write a file in "try catch" block for checking if the file exists, if it is opened, if it is not empty. This is the error message I get when the file not exist or it is empty. [code] terminate called after …

Member Avatar for heidik
0
84
Member Avatar for realproskater

So, i got this much done so far but im stuck and i cant get my third case statement to work, also for some reason it prints off the calendar like days 8 9 10, etc, if you copy and paste and run it you will see it doesnt line …

Member Avatar for realproskater
0
558
Member Avatar for tKc

We are required to make a c++ program to determining the cos of x by using the taylor series. i have made my program and it works pretty good but we are also required to stop the loop after the terms in the taylor series gets lower than .0001. any …

Member Avatar for Nathaniel10
0
383
Member Avatar for programing

Hi , pls i need your help . i write algorithm that calculate prefix average .. sum=0 for i=1:n do sum =suma+a[i] b[i]=sum/i return array b my teacher said , write above code using insted for .. how i can use the other for .. what are your opinion?

Member Avatar for Fbody
0
251
Member Avatar for pdk123

Hi, Trying to learn STL. I tried implementing the dynamic array with the STL. I wrote the following code and tried with int array works fine, but when i try with string array input, i get the error..can you please help me, [CODE]#include <iostream> #include <vector> using namespace std; template …

Member Avatar for pdk123
0
181
Member Avatar for tKc

I am trying to learn parameters by reference. In my code i try to compute the sum between 1 and n. This is what i got so far and if i input 5 it outputs a extremely high number. Any suggestions? [CODE] #include <iostream> #include <cmath> using namespace std; void …

Member Avatar for csurfer
0
131
Member Avatar for ace8957

Hi all, So I'm working on this program to detect if the w' in a string in the form of w$w' satisfies the condition that w' is the reverse of w. The only problem is that I have a logic error that I don't understand. If I input the string …

Member Avatar for ace8957
0
231
Member Avatar for vijaykrishnabor

Hi Please can anybody Tell me 1.what is virtual function in c++? 2.can we create virtual constructor and destructor and how to use it

Member Avatar for csurfer
0
144
Member Avatar for danish_izads

[CODE]#include<fstream.h> #include<stdio.h> #include<string.h> char num; int don; class sudoku { public: void putin(); int retchar(); void putout(); char name[30]; int a1,a2,a3,a4,a5,a6,a7,a8,a9,b1,b2,b3,b4,b5,b6,b7,b8,b9,c1,c2,c3,c4,c5,c6,c7,c8,c9,d1,d2,d3,d4,d5,d6,d7,d8,d9,e1,e2,e3,e4,e5,e6,e7,e8,e9,f1,f2,f3,f4,f5,f6,f7,f8,f9,g1,g2,g3,g4,g5,g6,g7,g8,g9,h1,h4,h2,h3,h5,h6,h7,h8,h9,i1,i2,i3,i4,i5,i6,i7,i8,i9; }; void sudoku::putin() { cout<<"\nEnter the Character of Sudoku "; cin>>num; cout<<"\nEnter the Name of Sudoku "; gets(name); cout<<"\nEnter the Values of first row "; cin>>a1>>a2>>a3>>a4>>a5>>a6>>a7>>a8>>a9; cout<<"\nEnter the Values …

Member Avatar for danish_izads
0
180
Member Avatar for punchinello

[CODE]class HRException { public: HRException() : m_pMessage("") {} virtual ~HRException() {} HRException(const char *pMessage) : m_pMessage(pMessage) {} const char * what() { return m_pMessage; } private: const char *m_pMessage; };[/CODE] It's a definition of an exception class I guess. How does the colon and the following "m_pMessage("")" work? Why does …

Member Avatar for punchinello
0
129
Member Avatar for claudiordgz

Hi guys, I'm new at C++ and I'm learning the basics on binary files This is what I've done: 1.- I created a class Criminal with basic data (age, crime type, criminal name) [CODE] class Criminal { private: int vnSerie; char vNombre[ 36 ]; char vtCrimen[ 20 ]; int vEdad; …

Member Avatar for Ketsuekiame
0
187
Member Avatar for Neon_Jesus

Hi, I am new to C and C++. This is my first course on the subject and my instructor handed out a printout in class with code on it to get us started, but he did not go over any other code or teach us any C. I can only …

Member Avatar for drkybelk
0
218
Member Avatar for BecomingPro

Well, heres a code that I wrote that displays the number of letters in lower case of any sentence that I put into the program. [CODE]#include <iostream> #include <string> using namespace std; int main() { int count[256] = { }; string str; getline(cin,str); for(string::iterator it = str.begin(); it != str.end(); …

Member Avatar for WaltP
0
114

The End.