429 Posted Topics

Member Avatar for VernonDozier

[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 …

Member Avatar for VernonDozier
0
214
Member Avatar for nurulshidanoni

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?

Member Avatar for localp
0
152
Member Avatar for maanasiiii

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.

Member Avatar for Agni
0
119
Member Avatar for anifeelings

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.

Member Avatar for Agni
0
65
Member Avatar for moltenice

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.

Member Avatar for Agni
0
277
Member Avatar for nurulshidanoni

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.

Member Avatar for Agni
0
957
Member Avatar for CE Student

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.

Member Avatar for Narue
0
136
Member Avatar for kux

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 …

Member Avatar for Agni
0
263
Member Avatar for Black Magic

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.

Member Avatar for chiwawa10
0
113
Member Avatar for Google Spider

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 …

Member Avatar for Agni
0
110
Member Avatar for cobberas

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 …

Member Avatar for vmanes
0
238
Member Avatar for Black Magic

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.

Member Avatar for Black Magic
0
101
Member Avatar for c_plus_plus_for

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.

Member Avatar for Ancient Dragon
0
308
Member Avatar for lostandconfuzed

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 !!!

Member Avatar for Agni
0
102
Member Avatar for yonex

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 …

Member Avatar for Laiq Ahmed
0
137
Member Avatar for rzr.copperhead

You dont need to change anything in those functions. where are you populating this vector?

Member Avatar for rzr.copperhead
0
120
Member Avatar for Agni

[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 …

Member Avatar for ithelp
0
201
Member Avatar for k2k

> `#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 …

Member Avatar for Ancient Dragon
0
130
Member Avatar for gretschduojet1

[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?

Member Avatar for Agni
0
128
Member Avatar for Traicey

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.

Member Avatar for Traicey
0
23K
Member Avatar for bis student

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

Member Avatar for BlackJavaBean
0
200
Member Avatar for resduq
Member Avatar for Traicey

Post one such program where you used an array and it didnt work. we'll try and help you find the mistakes.

Member Avatar for Traicey
0
103
Member Avatar for Traicey

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 …

Member Avatar for Traicey
0
142
Member Avatar for rsk8332

[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 …

Member Avatar for Agni
0
143
Member Avatar for Agni

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 …

Member Avatar for Agni
0
187
Member Avatar for Agni

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 …

Member Avatar for ithelp
0
68
Member Avatar for thomascrown

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.

Member Avatar for Joatmon
0
260
Member Avatar for Exo1337
Member Avatar for vmanes
0
109
Member Avatar for cosmos22
Member Avatar for Crazycfk

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 …

Member Avatar for Crazycfk
0
159
Member Avatar for rathmal
Member Avatar for jimJohnson

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 …

Member Avatar for Agni
0
148
Member Avatar for number87

once you return the number, just put a for loop with that number and cout the alphabet that many times...

Member Avatar for technogeek_42
0
297
Member Avatar for nurulshidanoni

question is not very clear ... where is the examcode? where r u putting it?

Member Avatar for Lerner
0
78
Member Avatar for arby11886

after you do the getname, do a getpopulation, divide the return value by 1000 and print it ...

Member Avatar for WaltP
0
95
Member Avatar for bhuvanwip
Member Avatar for blcase

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?

Member Avatar for Agni
0
172
Member Avatar for kahn1

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..

Member Avatar for WaltP
0
523
Member Avatar for jenymaru08

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 …

Member Avatar for hu_is_anonymous
0
150
Member Avatar for Arctic

dude i just executed your code .. n it was as smooth as fine scotch on rocks ... no segmentation faults... wish i could help...

Member Avatar for vijayan121
0
160
Member Avatar for Kupitzc

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 …

Member Avatar for Nick Evan
0
110
Member Avatar for VersEtreOuNe

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 ..

Member Avatar for VersEtreOuNe
0
125
Member Avatar for andyg55
Member Avatar for VernonDozier
0
175
Member Avatar for atish00

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

Member Avatar for atish00
0
184
Member Avatar for linux0id

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 …

Member Avatar for linux0id
0
90
Member Avatar for VIcissitude24

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 …

Member Avatar for superjacent
0
119
Member Avatar for want_somehelp

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...

Member Avatar for Agni
0
104
Member Avatar for winrycool

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...

Member Avatar for Narue
0
249
Member Avatar for blcase

[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 …

Member Avatar for Narue
0
2K

The End.