49,761 Topics
| |
can anybody tell me how can i call [QUOTE]displayHeading();[/QUOTE]function for only first if statement??? [CODE]void displayCerteinDate ( ) { //Find records with certain Date and Display all records in same Date. system("cls"); //clear screen int newday, newmounth, newyear; bool flag = false; cout<<"\nEnter the Date You want To Display (dd … | |
I have a Gtk TreeView named phoneBookTreeView Gtk::TreeView * phoneBookTreeView; can someone help me how to sort all the contacts inside the TreeView? if I have a code like this for sorting the contacts byname: [code]void PhoneBookModel::sortByName( Glib::RefPtr<Gtk::TreeSelection> selection ){ /* Enter SortByName Function here */ }[/code] what would be … | |
So my Data Structures class has finished the book we were using, but we still have a week of school left. My instructor has started going over binary files... only problem is I wasn't there when he went over it. My assignment is to open a binary file, save the … | |
What does the below statement do in c++, i have seen these being used in alot of programs. 1.ifstream ipfile; 2. ipfile.fopen(ipfname); 3. char buffer[BUFLEN]; 4. cout.put('\a'); 5. | |
Hello, I am stuck with a multiple declaration error during linking. I have 4 C++ source and corresponding header files(A, B, C,D) and one main source file(Main.cpp). Apart from that, I have one header file which contains two function declarations and some #define constants (Config.h) and 2 array decl which … | |
Hi everyone, i need to design a simple grading system and the requirements are as below: [QUOTE]Mark Grade ----------- -------- 90 – 100 A 80 – 89 B 70 – 79 C 60 – 69 D 0 – 59 F[/QUOTE] input.txt -sample input, i have attached the file too [QUOTE]Felix … | |
I'm having a file that contain the following: 12345678 abeer ahmed 2007 16-6-1989 8 9 ds121# that line repeated for different names and ids i nedd to sort this lines by gpa how which in that line = 8 how can i do it | |
I have to write a template that would swap two arguments, if second one is smaller than first. But in case of string beeing passed to function it would swap them, if second is smaller than first by length. Is it possible to implement that using just one template? Here … | |
to do this. A pointer gets created, say Head Would it be better to do this Head = new Node; Head = NULL; or is it better to do this. Head = NULL; Head = new Node; | |
hi guys, if you take over a project which is not documented and composed of lots of header files, code files and libraries, what should you do to understand work flow of the project. and if you need to modify some part of it, what should you do to locate … | |
[QUOTE=Ancient Dragon;862638]That is incorrect. The pointer is assigned whatever random value is at that memory location. For example [icode]char *ptr;[/icode] the address of ptr is whatever is at that memory location on the stack (assuming its not a global variable). It is never auto set to NULL by the compiler … | |
I am not familiar with C code. I want to convert this code to C++ and run it any help is appreciated. [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> #include<cstdlib> using std::rand; using std::srand; #include <stdio.h> #include <stdlib.h> #include <time.h> /*Global Declarations */ /* define a new type KEY_TYPE as … | |
Using Windows API's how can i copy to another file and Get different properties of a file (size, type, date created and more). i had done reading and writing file plz someone reply me quickly | |
I want to analyze the content of a text file & search for a string in the file. It is assumed a sentence is terminated by a , . ; ? ! This is what i have so far [code] #include <iostream> #include <fstream> using namespace std; int main() { … | |
i have seen an inheritance statement like this [CODE]className : virtual public anotherClassName[/CODE] what does virtual mean there? | |
i want to use the getexecutiontime() for a function in my program, but i want to use it for a function with arguments and the piece of code that i have is not working because my function have arguments prim_MCST(adj_matrix,nv); [CODE] long getExecutionTime(void (*func)()); // define Function long GetExecutionTime(void (*func)()){ … | |
Hello, I've a c++ project in linux and I want to create a text file and share it between more than one source file so that I can write into it instead of using only printf. Can anyone help me please? Thank you in advance, | |
Hi boys. This has nothing to do with coding. I have written an excellent peace of simulator in C++,for which I am very happy, for my Masters project for my supervisor. Does anyone of you know how to protect this, an aware like, for possible legal actions taken, in case … | |
function asks the date and search that day day in buffer and finds and displays all but my codes only displeying firs one, what shoul i do???? [CODE] void displayCerteinDate ( ) { //Find records with certain Date and Display all records in same Date. int newday, newmounth, newyear; bool … | |
i need to know the code for insert in middle, and this is what i wrote, i dont get any errors so theres some logic error in it, so please help me by giving me the correct code. [icode] void List::insertATMiddle(const string x) { Node* p = new Node; p->setData(x); … | |
Hi, I'm trying to declare a pointers value inside of a function, and then manipulate that data the pointer points to. This is the test program I compiled and like the original it gives the error "undeclared identifier". At both occurrences of [icode] *somevar [/icode] in the build function. Thank … | |
struct Fast_Food_Business { string name; Fast_Food_Business* head; Fast_Food_business* tail; }; struct cash_registers{ Fast_Food_Business * regist; cash_registers * r; } struct Customer { int n; Customer * h ; // head Customer *t; // tail Fast_Food_Business*next; }; bool menu (const char& number) { return number== '1' || number== '2'; } bool … | |
function asks the date and search that day day in buffer and finds and displays all but my codes only displeying firs one, what shoul i do???? [CODE]void displayCerteinDate ( ) { //Find records with certain Date and Display all records in same Date. int newday, newmounth, newyear; bool flag … | |
Hi Everyone, retrying c++ after a 10 year hiatus. F/C scientific programmer here :) So I have this really really long data file. It has a header and I want to locate the heading just before the data rows begin. The heading size may change from different sources, but the … | |
hello, iam very beginer in c++ and i have home work in matrices i want to know a method to make matrices and collect them by using array & pointer note i want to make a matrix code which make me type any matrices with any number of row or … | |
Can anyone tell me what are these two ** in front of Adj_matrix? | |
Hi, I tried to present a 2D mathematic matrix with C++ vector and expand it by repeating the first and last row and column. An example for intuition, I initialized a 2D C++ vector vec_2d to be as following: 1, 2, 3, 4 5, 6, 7, 8 9,10,11,12 13,14,15,16, and … | |
Hi, I have no1 to no30 product prices. I want to calculate combination for 30 product prices Suppose I have 30 different numbers.. I want to calculate their sum by using combination. But combination should not repleted i.e. E.g for 4 numbers... [ 10 20 30 40] I want to … | |
I have some code to cout the line from file. and to use it to find word in the file. ifstream bfile("test1.txt"); for(int i=0;i<=4;i++) {bfile>> word[i];} for(int i=0;i<=4;i++) {line = line+ " " + word[i]; } cout<< line<<endl; after that use find word in string to find or edit in … | |
hi,i am new to this site where i can chat with people on this site? is there some one who know a good programmer? i want to know how to make a program to bubble sort 2d array by using for loops and without using setw in c++. plz reply … |
The End.