581 Posted Topics

Member Avatar for drunkenmonk
Member Avatar for drunkenmonk
0
3K
Member Avatar for frosty1979

I dont know if this is the right place to post your question. Please visit the section of our forum dedicated to windows machines [url]http://www.daniweb.com/forums/forum99.html[/url] I hope that you will find your answer there :)

Member Avatar for VernonDozier
0
122
Member Avatar for Liszt

[url]http://www.daniweb.com/forums/thread191370.html[/url] isnt this a double post? Well I dont know what subkeys are but the copy constructor error means that you cant use '=' operator to initialise another subkey, because its not defined.

Member Avatar for Liszt
0
82
Member Avatar for 7eatsnine

Actually There are a lot of Errors in Your Code. But Dont worry, It happens to everyone. Okay Firstly I think you should do this. Note the following points. A Function cannot be defined inside another function. They are separate Units. So Now go through your code and look for …

Member Avatar for 7eatsnine
0
159
Member Avatar for M'N'M

iN THE FUNCTION void read( int **matr1,int **matr2,int& rows,int& cols,int& rows2,int& cols2){ What does mart1 point to? I mean You have not Initialised The variable for the matrix anywhere.

Member Avatar for tux4life
0
103
Member Avatar for newcook88

if (delim[b]=fileWord[b]) Firstly Assignment "=" is not equal to Equal to "==". fileWord.erase)(i); This would report a syntax error. for(unsigned int a=0; fileWord.size ();a++) Where is the condition in there? for(unsigned int a=0;a< fileWord.size ();a++) You should also try using iterators to go through arrays. Another code improvment would be …

Member Avatar for tux4life
0
600
Member Avatar for serkan sendur

I am writing an expression parser which acts as a calculator. Though i finished the first part. Now i am including user-defined functions into It. Been Working on it for 5 days . There is one bug that needs to be fixed. That is going on spoiling my Code. However …

Member Avatar for William Hemsworth
0
250
Member Avatar for k007

[QUOTE=tux4life;859644]I think you're already on a good way: you've already the skeleton of a class which will contain a flight's details ... [LIST] [*]Continue creating your Flight class [*]If your Flight class is ready, you could create a vector of it, that's a lot easier as you don't have to …

Member Avatar for k007
0
2K
Member Avatar for rush1

Firstly get the input in an array. After that you can use a recursive function which takes in an element of an array and then only adds elements in front of it till the array ends. Another thing is you should specify the number of elements that you wish to …

Member Avatar for rush1
0
105
Member Avatar for musique

[QUOTE=musique;860709]Really? Cause it didn't sort the numbers...let me show all the code then...maybe it is just not displaying.... [code] /***This program dynamically allocates an array large enough to hold a user-defined number of test scores***/ #include <iostream> #include <iomanip> using namespace std; //Function prototypes int getnumtestscores(); void gettestscores(int[], int); void …

Member Avatar for musique
0
255
Member Avatar for Sky Diploma

As i have written Atoi(); Now i have written Itoa. Here I have used a method of getting the last digit stroring it in an array and then reversing the array to get the required answer. I look forward for Improvements in this code. [CODE=C++] /**************************************************************************** Function Name:: itoa(int ,char …

Member Avatar for Sky Diploma
0
545
Member Avatar for Monkey.D.Luffy

I assume You can first write a function which takes in the marks determines the grade and returns it. I think you should explain a little more about where exactly are you stuck at.

Member Avatar for Sky Diploma
0
393
Member Avatar for BlackStar

[code] struct node { int value; node *head; node *tail; }; int main() { node *curNode = new node(); curNode->value = 1; curNode->tail= new node(); curNode->tail->head= curNode; curNode = curNode->tail; [/code] new node()??????????? I think you mean new node; there [code] struct node { int value; node *head; node *tail; …

Member Avatar for BlackStar
0
244
Member Avatar for Sky Diploma

I am getting a segmentation fault when i run the follwing program. This program takes in a const char* and returns the integer format. I also need advice on converting a C++ Octal or Hexadecimal Notationed string to an integer. Here is the code [CODE=C++] #include <iostream> #include <cstring> int …

Member Avatar for tux4life
0
233
Member Avatar for Lexter25

To read the matrix. Open the file. [code] while(!infile.eof()) { string x; infile>>x; dosomethingwith(x); } [/code]

Member Avatar for WaltP
0
289
Member Avatar for nokiolurv
Re: C++

Dude , This is not a Homework Completion Service. If you have any problems with the code. We help find errors and provide ways of correcting them.

Member Avatar for Sky Diploma
-1
120
Member Avatar for Sky Diploma

Here i have to define a function which will reverse a c-styled string. I have made 2 functions one using dynamic memory and the other not using dynamic memory. I would like to know of any improvements that can be made in the code. I would also like you to …

Member Avatar for tux4life
0
138
Member Avatar for LucyB
Member Avatar for rahul8590
0
111
Member Avatar for Grn Xtrm

Firstly you are returning a Fraction type but not stroring or displaying it. [code] Fraction frac=SumOfSeries(num); frac.display; [/code] Secondly in Function SumOfSeries Why are you introducing a for loop? [code] #include "Fraction.cpp" #include<iostream> using namespace std; Fraction SumOfSeries(int n);//adds fractions from num to 1 int main() { int num; cout<<"Enter …

Member Avatar for Grn Xtrm
0
793
Member Avatar for songweaver

This program is quite simple. I think you are getting confused at this [code] t = t + 2 * c; [/code] I assume you should read it in the order of processing of the compiler. [code] t =t + (2 * c); [/code] This is the same when it …

Member Avatar for JasonHippy
0
91
Member Avatar for Sky Diploma

Hey all, I have decided that in order to learn i will need to write code. So i am working on all the questions on my book. And as I am teaching myself i end up with no-one to scrutinize my code. [code=c++] #include <iostream> /************Declarations of Functions*********/ void func1(); …

Member Avatar for lqdo
0
358
Member Avatar for Sky Diploma

Hi all, I have defined a function cat which takes in 2 cstring arguments and returns out a pointer to a new cstring which cocatenates the 2 strings I am having 2 problems with it. the cout statement doesnt work and secondly i get a runtime error while i delete. …

Member Avatar for Ancient Dragon
0
191
Member Avatar for Gewalop

I think you should send the argument "word" as a reference and not copies of the argument.

Member Avatar for siddhant3s
0
154
Member Avatar for skisky

I think you are searching for this [url]http://www.cplusplus.com/reference/string/string/find/[/url] The FInd function is built in in strings to search and find substrings. It returns -1 if the substring is not found or returns the position of the string if it is found.

Member Avatar for skisky
0
92
Member Avatar for skisky

[QUOTE=Narue;853101]>std::transform(msg.begin(), msg.end(), msg.begin(), std::tolower); Congratulations, you've propagated one of the more annoying bugs among C++ help forums[1]. 1) tolower isn't just a function in <cctype>, it's also a template in <locale>, which is allowed to be included by any standard header (<iostream> is the usual culprit). As written, there's an …

Member Avatar for Narue
0
317
Member Avatar for elbashamoe

Show us the code that you have come up with. or I mean where do you need help at?

Member Avatar for tux4life
0
105
Member Avatar for RizzLinux1388

Well you are infinitely running the loop. with your function call. [code] string foo("foo"); string barbar("barbar"); [/code] With the above code, Your Professor is assigning the values foo and barbar to the variables through a constructor. [code] void string::swap(string first) { string second; first.swap(second); } [/code] With this code you …

Member Avatar for jephthah
0
204
Member Avatar for booker

[code] #include "..//Folder_Name//File.h" [/code] or [code] #include "../Folder_Name/File.h" [/code] I think this should work out. You need to traverse to the previous directory and then to a sub-directory.

Member Avatar for booker
0
98
Member Avatar for viki0077

Does the 2 second time gap symbolise 2 seconds or is it exactly 2 seconds? [url]http://www.cplusplus.com/reference/clibrary/ctime/difftime/[/url] This will help you get the 2 second delay you want. If you use the link and the example in that link properly. After that it might be very easy.

Member Avatar for tux4life
0
8K
Member Avatar for Clockowl

Firstly i dont prefer using your own version of duplicate assasin ;) I prefer unique_copy function in the standard library. [code] unique_copy(x.begin(),x.end(),y.begin()); [/code] Would do the trick.

Member Avatar for siddhant3s
0
2K
Member Avatar for Sky Diploma

Hello all, I am solving some of the exercises in a new book of C++ I am having trouble in declaring [quote=THE C++ BOOK]A Reference to a array of 10 Integers[/quote] Its on the 19TH and 30th line. I have the total code over here. [code=c++] //Declarations for all the …

Member Avatar for MrSpigot
0
260
Member Avatar for Crago3

CARGO i recommend that you use code tags next time. Secondly instead of converting in an arphadox manner. Why not use the library function. [code] toupper(); [/code] [url]http://www.cplusplus.com/reference/clibrary/cctype/toupper/[/url] The above website will show examples on the usage ;)

Member Avatar for Narue
0
177
Member Avatar for tones1986

[code] reqList = new list<string>[6]; [/code] I doubt this code. [code] list<string> reqList(6); [/code] might be the correct way to do that.

Member Avatar for Sky Diploma
0
142
Member Avatar for pczafer

Well, A simple solution would be to read in all the data. Find the person whose data needs to be edited. Then after that. Edit the data. Then Write the file all over again .

Member Avatar for Sky Diploma
0
100
Member Avatar for FREEZX

Guys instead of USING AN ARPHODOX method to solve your conversion from char to numerical. Why dont you use the atoi() function built in. That way you will not need to care abt any format. [code=c++] string a; unsigned short int Sum=0,i; a="12522"; for(i=0;i<a.length();i++) { string b; b=a[i]; Sum+=atoi(b.c_str())]; } …

Member Avatar for tux4life
0
1K
Member Avatar for lancevo3

Notice that in all the input you are getting from the file, You have an extra " " space after the "," (Comma). So I think that the code should actually be [_CODE REMOVED_]

Member Avatar for Clockowl
0
161
Member Avatar for sabian4k

i seriously donot understand which part of the code do you think is the problem and secondly .. What the problem is. Please Explain.

Member Avatar for Lerner
0
154
Member Avatar for Akis2000

SOUNDS LIKE MISSION IMPOSSIBLE. This will self destruct in 5-4-3-2-1 BOOM!!! :)

Member Avatar for Akis2000
-1
797
Member Avatar for Samuelandjw

[code] int[3][2] oppo_pos = { [/code] Shouldnt that be [code] int oppo_pos [3][2]={ [/code]

Member Avatar for Sky Diploma
0
124
Member Avatar for 123james456

You can use strcmp() function to check the strings. Secondly. I would also recommend that you get all the input in lowercase with tolower() function for each character of the string. THis is because ADD!=add!=adD

Member Avatar for 123james456
0
104
Member Avatar for lauren316

[QUOTE=lauren316;838658]Can anyone tell me what I am doing wrong in this code? The output window allows me to input the string, but does not output whether or not it is a palindrom. There are no build errors Thanks in advance! Lauren [code] #include <iostream> #include <deque> #include <string> #include <cctype> …

Member Avatar for rahul8590
0
693
Member Avatar for vijaysoft1

Fire up google and learn the basic FILESTREAMS. After doing that, the rest will be very simple to understand. If you have any prob after that. Then you can post your question up.

Member Avatar for Lerner
0
107
Member Avatar for sara khan

[code] if(no>=10) { j=no%base; for(int k=0;k<j;k++) arr[i]=a+k; i++; no=no/base; } [/code] I would like to know what are you trying to do here. FIrstly you are converting the alphabet character 'A' into an int. ANd then secondly after the for loop is done it would just add (a+j) in the …

Member Avatar for Sky Diploma
0
131
Member Avatar for mmeyer49

Firstly. You have no function call back to main after you have entered the data. So it probably thinks that the program ends there . You have commented the menu function in add end and have not mentioned it in addstart. Secondly. to add the book to the start of …

Member Avatar for r.stiltskin
0
189
Member Avatar for Sky Diploma

Hi all, I have just created a template for my website and then have put in my GOOGLE Adsense script in it. When i open it with Internet Explorer. The page gets displayed nicely. But when i open it with Mozialla Firefox it doesnt display any Adsense ads. Secodnly the …

Member Avatar for Sky Diploma
0
99
Member Avatar for mimis

You should try googling it out [URL="http://lmgtfy.com/?q=brute+force+search"]Clicky[/URL] Though its very easy.

Member Avatar for mimis
0
147
Member Avatar for Sky Diploma

Hi All, I have taken up this home project just for my pastime. My objective is to take a html file and then make a complete new webpage with a specific keyword. It basically is a find and replace type of method where my existing file contains a specific keyword …

Member Avatar for Sky Diploma
0
210
Member Avatar for Linking_90

I am not sure. But [code] tempnum /= tempnum ; [/code] You are dividing a number by itself which would result in being one right. I think it should be [code] tempnum= (tempnum-tempdig)/10; [/code] This way the last digit can be removed . If that is what you want to …

Member Avatar for Linking_90
0
145
Member Avatar for winrawr

Well . I think : when the compiler starts reading your code. it goes into the (set error message function) and then looks at a class B .. which doesnt exist until then . --------------------------------------------------- Secondly. There is no need for the class A to be in class B. So …

Member Avatar for winrawr
0
166
Member Avatar for Sky Diploma

I have to find the sum of the prime numbers below 2million so here is the program that i have written. [code=c++] #include <iostream> using namespace std; bool is_prime(int); int total=0; int main() { int num=2000000; for(int x=1;x<=(num);x++) { if(is_prime(x)==true) { total+=x; cout<< total<<"\n"; } } cout<< total; return 0; …

Member Avatar for Sky Diploma
0
129

The End.