429 Posted Topics
hey guys ... i was wondering shouldn't we awarded some kind of privileges as we move up the rank?.. for example when a light poster becomes a junior poster(like me :), n i'm so proud if myself) say he can be given the privilege of getting one query answered by … | |
I have a vector of a structure.. say [QUOTE]struct employee { string name; int age; int empId; }; and a vector of this structure RWTValOrderedVector<employee> vec;[/QUOTE] suppose this vector has 4 entries. Now if i want to find in this vector for employee information of a specific employeeid, how do … | |
Re: setting up the loop is easy you read the number n then put a for loop for(int i=0;i<n;i++) { // here your code for checking of divisibility of 'i' will appear. it'll be an if-then-else conditional check. } hope this helps | |
Re: whats the error that you're getting?? for array of structure say [QUOTE] personnel arr[20]; arr[0].name = "blah"; .. .. arr[1].name = "blah"; and so on and so forth. you can put this in a loop to take 20 inputs [/QUOTE] | |
Re: either you give the complete path in the include statement. or else what you can do is that you can add the complete path in the include path of the compiler. in command prompt we do it by using the compiler option -I. eg gcc -I<path> file.cpp you can set … | |
Re: try #include <iostream> //removed .h in the end #include <stdlib> | |
Guys i have a design where in i have 6 classes called 1)HttpServer 2)ParserClass 3)InputInterface 4)Cartonization 5)OutputInterface and then i have a 6)Manager class. HttpServer gets the request xml as a string in request body. ParserClass parses the string xml and stores value in variables. inputInterface inserts the values in … | |
Re: when you declare a function as const, it implies that you cannot change the state of the object inside that function. that means you cannot change the value of any member variable inside the function and you cannot make a call to any non-const function either. that is y its … | |
Re: where's the code? also this algo will always work only for 4 digit numbers, with a little more effort you can convert it to a general code for any no. of digits in the number.. | |
Re: [CODE]#include <iostream> #include <fstream> using namespace std; int main () { //variables declared for fstream ifstream indata; ofstream outdata; //files to open and to close indata.open("c:\\data.txt"); outdata.open("c:\\results.txt"); char line1; int line2a, line2b; char val1[4],val2[4]; char delim = ' '; indata>>line1; cout << " The ASCII value of your character is … | |
Re: but you needed to re-insert the 84 char string again into the new string..rt? | |
| |
Re: can you post that code? i dont know y you need the loop... | |
Re: that was a very stupid answer indeed. what he wanted was some kind of suggestion from personal reading. i.e. if you had used some book which you found really good you could have suggested that, instead of trying to be extra smart ... | |
Re: dude your code is too difficult to read, next time please indent it properly and put in CODE tags however i can make out that you have not overloaded the operators in your class. The operator funtions need to be declared as member functions of your class got it? | |
Re: i guess what you want to do is create variables of type tree, for that you dont need to do typedef. you can say [CODE] tree banyan; tree apple; or else struct tree{ int height; int width; int weight; } banyan, apple; [/CODE] and they will be two separate variables … | |
Re: when you include one file in more than one places it might cause a redeclaration problem. to avoid that put ur includes in guards with ifndef and endif preprocessor directives. eg: person.h [QUOTE]#ifndef PERSON_H #define PERSON_H class person { \\\ }; #endif[/QUOTE] and then wherever you include this file, do … | |
Re: if you post the code that YOU have tried then we can help you in debugging and solving the problem. but you cant just expect spoon feeding here.. ps: i just got ripped left-right-center for trying to solve a similar thread | |
Re: pick up a c++ book for beginners and start over... | |
Re: whats the use of the const global variables? y r u re-declaring them in main? just think whats the objective of the code, what will be the min number or variables required,their types and usage and then re-write the code. | |
Re: you can open a text file and write into it. that shd work i guess. | |
Re: just type 'resize + array' in the search text box and you will find the answer. | |
hey guys ... Are there any people out here who've done their masters in comp science? .. need to know whats the best time to go for a masters? how easy or tough it is?? and most importantly how useful? i have a bachelor of engineering in electronics but i'm … | |
Re: [QUOTE=Ajuddy;516742]HI, I am still new in this language. i would like some help. i need to write a program that finds an avarage marks of "y" students by rerunning and terminating the program. i need this in a 2 dimensional array to store a roll number and marks of the … | |
Re: use >pstack core | |
Hi, i'm a c++ programmer and for the first time i had to do some xml parsing in my code. i have been able to do that succesfully using the xercis library, fetching the value of each tag from an input XML file, however my concern is that what if … | |
hi... i'm a c++ developer n mainly looking to enhance my knowledge through this forum .... -rajat |
The End.