49,761 Topics

Member Avatar for
Member Avatar for dmegee

Hi I am trying to find out what I am doing wrong with this code...I need it to load a file and encrypt it, print it, encrypt it again(decrypt it), print it then save it to another file. the original and the new file should be the same...Here is what …

Member Avatar for John A
0
93
Member Avatar for alias47

Hello everyone :) I have a problem with Kraskal's algorithm. :sad: How it is possible to choose the node I want to start with to build minimmum spanning tree? Thank you for ansvering :) [code=c] //implemented using sets concept #include<iostream.h> class kruskal { private: int n; int graph[10][10]; int tree[10][10]; …

Member Avatar for ~s.o.s~
0
112
Member Avatar for DmD

Hi, I'm making a program that is has to send texts from textboxes to a external device wich shows them on leds. But the LED's cant show every character(takes to much time :P), so i'm tasked to make a filter on the textboxes to check if they contain any invalid …

Member Avatar for Ancient Dragon
0
128
Member Avatar for rati

i need to print a wildcard * in the output . a program that takes a string as command line argument prints all the files in the directory instead of *. can u help me?

Member Avatar for rati
0
108
Member Avatar for pugg09

I tried searching the forums but I've come up dry. Can anyone help me with this simple coding excercise. I wanted to template my datatype in my class, but it's coming up with errors. [code=c] //template <typename T> //----> i want to use this class typeClass { private: int myArg; …

Member Avatar for ~s.o.s~
0
102
Member Avatar for ok555

Hi, I need to be able to call a function from all the C++ files included in my project and i am not sure how to do it.. everytime i try something (such as exporting a class or function) i get multiple function declaration errors and it fails to compile, …

Member Avatar for Ancient Dragon
0
724
Member Avatar for hamidr

when i compile a simple program in Dev C++ i get error:" conflicting types for 'myf' " [CODE]#include <stdio.h> #include <stdlib.h> int main() { myf(3.0); return 0; } double myf(double x) { return x; }[/CODE] what does that mean?

Member Avatar for Ancient Dragon
1
74
Member Avatar for Juggler

I have a question about manipulating an array in C++. In my program, a cstring is entered. The string is printed. Finally, the string must be printed in reverse and displayed. The final part is where I am having my problem. I have the strlen function determine the legnth of …

Member Avatar for Juggler
0
220
Member Avatar for spacecowboy123

Hi all, I'm new to C++ and am having a problem with a piece I am writing for an assignment. The problem area is below. [code] //arrival process on the corporate links if (clock % 4 == 0) { double randomno randomno = randgen; // Generate random number if (randomno …

Member Avatar for spacecowboy123
0
2K
Member Avatar for matrimforever

In the following code, how do I change the line under [code] cout << "\nThe value of bogus in num1 is " << num1.bogus;[/code] to get it to compile correctly. I know its calling for theValue which is private. Not sure what to change to make it work: [code] #include …

Member Avatar for matrimforever
0
105
Member Avatar for amen

i want to get token from string using string class. i know that using cstring, i can use strtok.can i use it? [CODE] #include <iostream> #include <string> using namespace std; void echo(string message) { cout << message << endl; } int main() { cout << "Enter your word: "; string …

Member Avatar for ~s.o.s~
0
114
Member Avatar for SlightlyAngelic

[code=c] #include<stdio.h> #include<math.h> # define I 0.0765 //Interest Rate char fname[20]; char lname[20]; float loan = 0.0; int years; double PB; //Prototypes double Mortgage_Calc(void); void Financial_Report(void); int main() { printf(" *******************Caribbean Mortgage Company*************\n\n\n\n\n"); printf("Enter the Customer's Name (First Name and Surname)\n"); scanf("%s%s",fname,lname); printf("Enter Requested Loan Amount\n"); scanf("%f",loan); printf("Enter Number of …

Member Avatar for Salem
0
132
Member Avatar for matrimforever

Hi all, I need help turning this: W = 35.74 + 0.6215t - 35.75 (v0.16) + 0.4275t(v0.16) into code. I guess the real problem is the how to turn v to the .16th power using this function: double pow(double [I]x[/I], double [I]y[/I]) I know how to open a file with …

Member Avatar for matrimforever
0
165
Member Avatar for suep

[B]Is their a way of using windows98/Me to make a chart?Or lines goes up or sqares?Or how can i make a chart?[/B]

Member Avatar for ~s.o.s~
0
84
Member Avatar for Manas Kumar Sen

I am using Dev c++ IDE for c and c++. When i run an aplication the running window disappears quickly. What should i do?

Member Avatar for Anonymusius
0
64
Member Avatar for newbie2c++

I am totally stuck on this problem and would love it if anyone knew how to help me fix it! Thanks for any input!!! Here are directions: Write a program that asks the user for a positive integer value. The program should use a loop to get the sum of …

Member Avatar for WaltP
0
323
Member Avatar for phuduz

hey guys heres a program thats suppose to assign a letter grade to a given percentage on an exam and i just keep gettin the same three erros at the bottom saying i have undeclatred indentifiers but i dont see how so any help would be very much appreciated [code] …

Member Avatar for phuduz
0
92
Member Avatar for chubbywubba

i have to make a minesweeper game for class, 3d none the less using microsoft visual c++. i have created my dynamic class. there needs to be a node class and a grid class. i have no clue how to do it. if you can help please help me, its …

Member Avatar for Ancient Dragon
0
105
Member Avatar for sunny123

this is a progarm i have created to calculate srudent grades given the three grades. the computer then works out te average and assigns a grade depending if average is more than 50. the program stops after giving the average of the three grades and doesnt output whether pass of …

Member Avatar for Anonymusius
0
127
Member Avatar for pengwn

The code below gives : Data is : hello srikanth its me Data is : Data is : Data is : [code]#include <string> #include <iostream> #include <boost/regex.hpp> boost::regex e("(\\w)\\s*(\\w)\\s*(\\w)"); boost::match_results<std::string::const_iterator> what; int main() { int i; const std::string input = "hello srikanth its me"; boost::regex_match(input, what, e, boost::match_default | boost::match_partial); …

0
66
Member Avatar for pengwn

Can someone help me out code using the below to get the equivalent program as beneath: [B] boost::match_results<std::string::const_iterator> what; boost::regex_match(input, what, e, boost::match_default | boost::match_partial)) [/B][COLOR=#0000ff] [/COLOR][code]#include <iostream> #include <string> #include <boost/regex.hpp> int main() { std::string s = "who, lives:in-a, pineapple under the sea?"; boost::regex re(",|:|-|\\s+"); boost::sregex_token_iterator p(s.begin(), s.end(), re, …

0
78
Member Avatar for Brent.tc

I need help with using the cin command\function. Any time I try to use it outside of the main function it does not work what am I doing wrong?

Member Avatar for WaltP
0
109
Member Avatar for paradoxxx

Can anyone help me with this project, I cannot figure it out. Enter characters one by one until a predetermined “sentinel” or the maximum number of characters is entered. The maximum [B]MUST[/B] be less than 96. The sentinel character can be any character other than an italic alpha or, space …

Member Avatar for Ancient Dragon
0
112
Member Avatar for e21_kam

Hi, I am doing a part time degree and need some help to finish off some code for my first assignment in C++. I have written a program which checks some inputted int's and strings, validates them and outputs the result. The last thing I need to do to finish …

Member Avatar for e21_kam
0
198
Member Avatar for Lutzee

Hi there, im a c++ noobie. I have a class called node. Node has a data member id. When i try and access id in the obect named f outside of main visual studio 2003 gives me the errors: : error C2065: 'f' : undeclared identifier error C2228: left of …

Member Avatar for Salem
0
119
Member Avatar for pitopito

Hi, My goal is to perform a single SQL query (“select xxx from yyyy etc etc”) to a Database over a LAN, using BORLAND C++ 4.5 and managing USERNAME and PASSWORD. I tried 2 methods so far : Method N.1) I used “Tquery”, TdataSource and TDBedit components linked togheter and …

Member Avatar for Ancient Dragon
0
109
Member Avatar for FireSBurnsmuP

Alright, I cannot get the getline function to work. I have iostream included, using namespace std, and here is the syntax I have down: [inlinecode]cin.getline(playerOne, 21);[/inlinecode] with playerOne declared previously as a string, and I want its max input to be 20 characters. What's going on here? It's not working …

Member Avatar for WolfPack
0
149
Member Avatar for matt611

Ok our teacher gave us a .h and .cpp file for a class called "JarType" and our assignment is to overload some of the math operators. Now I know how to overload operators if I'm adding two JarTypes together. What I'm having a problem with is overloading when I have …

Member Avatar for WolfPack
0
108
Member Avatar for LieAfterLie

How would you change the same member of many objects of the same class (or structure if possible)? [CODE]struct point { float x, y, z; } point a, b, c; a.x += 20; // b.x += 20; // now how would i do this in one statement? c.x += 20; …

Member Avatar for LieAfterLie
0
78
Member Avatar for Barefootsanders

Hey guys. Ive been working with fstream for about 2 hours and i give up. My problem is I have a text file with an unknown number of rows. Each row has a known number of items. i cant figure out how to read the elements in each row. after …

Member Avatar for Barefootsanders
0
70

The End.