429 Posted Topics
Re: [QUOTE=VernonDozier;587469]Thanks for the response and the link. As far as I can tell, I'm doing it right, but I still get the same result: the error message and no output file. Here's my updated code. As you can see from lines 16 and 17, I tried using both "ios" and … | |
Re: where's the code to do sorting just the total? at the time you swap the totals, you can swap the examid's also, i think that should work. what say? | |
Re: what will be the functionality of the trigger?.. if it's to distribute the load then i think it should be a row-level trigger. | |
Re: What do mean by working? The difference lies in their usage, in the way they are declared, their inheritance etc. but they work in the manner you specify them to work. | |
Re: it would be nice if you tried compiling it and then let us know which lines are throwing errors and then we look into it. Also you done need to put everything in code tags, just the code will do. | |
Re: There are some missing '{' brackets after line 69,75,80. Can you try after fixing them. and if that's just a typo then plz paste the corrected version. | |
Re: if you tell us that in which part you're facing a problem or if there's some compilation error we might be able to help you. | |
Re: and when i tried compiling it using 'cc' it went just fine :-( ... i suspected that this could be happening because you dont have a virtual dtor defined for the classes. Since you are pointing a base ptr to a child class, when you say delete b you dont … | |
Re: use one array to store the score of each student and another to store the weight of each student. If you know the number of students beforehand then it's all the more easier. | |
Re: From your logic you didnt need an array of integers at all. you are writing the value to the same pointer every loop. if you want to use the array do something like this. cin>>ptr[count] and then later sum up the array. or else simply use an int var and … | |
Re: when we do CandyBar *Candies = new CandyBar[3]; we are allocating memory to hold 3 elements of CandyBar type and returning the pointer to the base address of this memory. This address will actually be same as the address of the 0th element. both CandyPointer abd Candies point the same … | |
Re: That would fail the purpose of this community. When you ask questions here and people give answers it helps other's who might be facing similar problems. Just like you can find a lot of answers by going through previous threads. | |
Re: To assure that the base class is pointing to the correct child class we use 'dynamic_cast' . This will do a RTTI to make sure that the base class is actually pointing to class to which it's being downcasted to. | |
Re: awesome is fine .. but i hope you understood your mistake... just taking his code blindly and using it will not help... FYI you were not using recursion at all !!! | |
Re: here atrr is declared as static as i result that the address that you are inserting into the vector is same everytime. [quote] insResult = atrributeMap_g.insert(std::make_pair(atrr.name, &atrr)); [/quote] as a result when you do [quote] Itor->second->name; Itor->second->id ; [/quote] you get the same values everytime. can you print the address … | |
Re: You dont need to change anything in those functions. where are you populating this vector? | |
[quote]Reposting from another forum as i didnt get many suggestions there[/quote] Hi Guys, In my project the user will enter the name of the organization and it's floor map has to be displayed. the maps have to be made by us and need not be complicated at all. what i … | |
Re: > `#ifndef hourlyEmployee_h` > `#define hourlyEmployee_h` > `#include "employee.h"` i dont think the file employee.h is getting included at all. You should do #ifndef hourlyEmployee_h #include "employee.h" #endif or infact you dont need to use the ifndef while including the file if you have already used them in the header … | |
Re: [quote]how do I enter the name, length, and time for each course?[/quote] That's the only question? i find it strange that you could write a polymorphic code, use virtual functions but find it difficult to get the input!!! arn't those the values you are passing in the ctors? | |
Re: if i'm not wrong you can directly assign an integer to a double in c++, there's no need to do an explicit casting. | |
Re: To start with change findArea(double&;double &) to findArea(double&,double &) replace the ';' with ',' arguments in a function defn n decl are separated by comma not semi-colon | |
Re: Post one such program where you used an array and it didnt work. we'll try and help you find the mistakes. | |
Re: There are a lot of considerations but to start with you can use one rule. -> when you dont want to change the actual variable, you pass by value. in this case in a copy of the variable will be made in the called function and hence the original value … | |
Re: [QUOTE=rsk8332;561942]Hi, Suppose I have a character array array1[]={A,B,B,B,A,A}. Now I want to declare a structure with a pointer in it and make each array1 element point to the previous element.For example last array1 element 'A' will point to the previous 'A' which will point to 'B' and so on. Can … | |
hi, I have a XML in a String coming from an external input. The problem is that this string is getting some junk characters appended to in the last. I need to find the lenght of the string only till the correct part. once i get this lenght i can … | |
Hi Guys, In my project the user will enter the name of the organization and it's floor map has to be displayed. the maps have to be made by us and need not be complicated at all. what i want to know is that what technologies can i use to … | |
Re: use the search text box on the top right hand corner of your screen. search in this forum for 'validating input' or something like that. you will get some good ideas and approach. | |
Re: dude i compiled and executed ur code... output was just as expected .... | |
Re: is this line still there? [code]DWORD d = 0;[/code] | |
Re: you have c1,c2,c3 declared in global as int then inside the fn as char and then again as int... what r u trying to do? you declare them as char then you pass them to cResist which takes int, so it has the ASCII values and then you pass them … | |
Re: you mean to say that when the user says 'no' to this "cout << endl << "Another order? (Y/N)";" you want to add up those numbers for the entire user order..rt? for the correct way of doing this lets first put everything inside the while loop first. [code]while ( (ans … | |
Re: once you return the number, just put a for loop with that number and cout the alphabet that many times... | |
Re: question is not very clear ... where is the examcode? where r u putting it? | |
Re: after you do the getname, do a getpopulation, divide the return value by 1000 and print it ... | |
Re: dont seem to get it ... you have a class called collect.. the attributes if that class are initialized from some attributes of the movie class, rt? where is the array? can you put the code where you are using this operator? | |
Re: i think it would b better if you take them in an array ... for swap i would suggest you use the XOR (^) operator to do it without a temp.. | |
Re: 1>structure is a user defined data type, so once the user defines it he can use it just like any other data type, like in your struct you have 2 variables of type char and int, similarly you can add another variable of some struct data type. suppose there was … | |
Re: dude i just executed your code .. n it was as smooth as fine scotch on rocks ... no segmentation faults... wish i could help... | |
Re: what i dont understand is, y do you need a 3d array to hold only the last names of the passengers? just a 2d array shd work well.. and this will not create an array with 15 rows and 6 columns.. it will be 15 2d arrays with each 2d … | |
Re: i would suggest you load the contents of the file in a map either in the beginning or when the user chooses option 2 and then when the user enters the Id of the circle, fetch the corresponding circle details and print it .. | |
Re: printf("%d\t", matrix[i][j]); shd be inside the inner loop ... | |
Re: declare a 2 dim array. inside the inner loop, as user for i/p and keep storing in each element of the array. --post the code inside code tags | |
Re: if you assign memory on the heap in ur code then you have to release that too.. in the first case in your destructor you should delete the pointer to release the memory. in the second case the creation and deletion of object will be taken care of by the … | |
Re: without trying to understand the logic i can tell u a few things .. > change 'main' to 'int main' > change nWords = numWordsInFile( textFile, nWords); to only numWordsInFile( textFile, nWords); & int numWordsInFile( ifstream &in, int &nWords) to void numWordsInFile( ifstream &in, int &nWords); as here you'r passing … | |
Re: if you post the code you wrote and tell us at which point you're getting stuck then we can give you some good advice... | |
Re: wow... can that be done in c++?? can someone tell me which API's to use for this?? would luv to give it a shot... | |
Re: [QUOTE=blcase;517395][code] class Movie{ private: string director,title,genre; public: Movie(){ director="";title="";genre="";} int main(){ Movie a();} [/code] I am having problems with my default constructor. my program compiles but it gives me a warning "warning C4930: 'Movie a(void)': prototyped function not called (was a variable definition intended?)" and if i try to run … |
The End.