49,757 Topics
| |
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 | |
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 … | |
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 … | |
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; … | |
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]. | |
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 … | |
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 … | |
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: … | |
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 | |
hi please can anyone tell me the difference between virtual function and abstraction function . | |
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 … | |
Hi is it possible to have recursive function as inline function ? this was question asked interview please help me | |
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 … | |
[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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 | |
[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 … | |
[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 … | |
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; … | |
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 … | |
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(); … |
The End.