49,761 Topics

Member Avatar for
Member Avatar for C++Challenged

I need to write a program to decipher a code and process a set of characters in a text file. this is the text file: >EBC;Iit_is a CaPital Mistake tO_theorize Before_one has DatA123. There are 6 encrypted characters at the beginning of the file. The encryption is based on the …

Member Avatar for hardatwork
0
141
Member Avatar for TheGlyde

[CODE] #ifndef LexA_H #define LexA_H #include <iostream> using namespace std; class LexA { public: int charClass, lexLen, token, nextToken; char lexeme[100], nextChar; private: char character; public: LexA(); void setChar(char); void addChar(); void getChar(); void getNonBlank(); int lex(); int lookup(char); #define int_lit 10; #define ident 11; #define assign_op 20; #define add_op …

0
70
Member Avatar for giftalp

I have created class menu and class number. I would like that my functions in class do sum, subtract, multiply, and divide. I've done sum, but I have problems with other functions. When I do difference, it is actually sum my numbers, and result of multiplication and division is 0 …

Member Avatar for giftalp
0
192
Member Avatar for StopWatch

Hi all, I am senior in high school and I am currently taking computer science classes in which we are learning C++. I understand the most basic implmentations of C++ fundamentals. I am seeming to have a lack of full understanding with heaps. I have borrowed several books in the …

0
44
Member Avatar for hq1

Hey so I wrote this blackjack program to read from file but i'm getting these errors on the specified lines: Error 1 error C2059: syntax error : 'while' line: 46 Error 2 error C2228: left of '.ins' must have class/struct/union line: 48 Error 3 error C2050: switch expression not integral …

Member Avatar for Ryaether
0
135
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
322
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
258
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
193
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
252
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
183
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

The End.