49,755 Topics
![]() | |
Hi friends, I want to implement code which can take input from some other application. Like say for example ls | less Here, less is the application/utility which takes input from ls via pipe. I want to implement the same in C. I Did following things 1. Created PIPES using … | |
` Inline Code Example Here #include <iostream> #include <stdio.h> #include <string.h> #include <stdlib.h> struct contact_detail { int id; char user_name[15]; char email_address[15]; int phone_number[10]; char address[10]; }; struct meeting/appointment { int date_of_meeting/appointment[7]; int time_of_meeting/appointment[4]; char location[15]; }; struct new_user; struct meeting; void add_new_record(void); void binary(void); void delete_record(void); void edit_record(void); void … | |
![]() | I've tried lots of times to get this to work but , no luck . the problem is this program shows white screen , and It doesn't display the polygon . Here's the code , take a look : /*Headers*/ #include <GL/glut.h> /*End of headers*/ /* Check Compiler*/ #ifdef __FLAT__ … ![]() |
I am student just finished an introductory class on C++. Can any one help me build a GUI for my programs? Maybe a template? Example? Any and all help would be greatly appreciated. Thanks. | |
A queue is a restricted data structure that allows only the following operations: a.Enqueue" an item at the end" of the queue. b.Dequeue" an item from the beginning" of the queue. These should correlate with your intuitive notion of a queue (line) in the physical world. In queues the first … | |
// my problem is in the playerscore and computerscore always gives me 0 or 1 // i cant know who finally won plz i need ur help //at the end of the program it should gives me the score of computer and the user out of 5 of the total … | |
Helloo... I am making a simple notepad program. I don't know how to move cursor using ASCII Table. I am using Two way doubly Linked List method to insert characters. And file handling to save on file. I don't know how to move cursor on up, down, right and left. … | |
Hi, I have followed the tutorial in this link: http://www.cs.ucla.edu/~zhu/tutorial/Using_MS-MPI.pdf to use MPI on my local windows machine with vs. The simple Hello wold work as expected, I have 2 processors and I get the expected result. The problem is when I try a very simple send receive program I … | |
Can Any body do it???? These are Some Info..... Create a notepad that allows the user to write text on the console. For this purpose, the user should be able to control and track the movement of the cursor. The user can access, add and delete any part of the … | |
I am supposed to write a program that displays the first 10 lines of a file. I have a file named "characters.txt" in the same folder that my .cpp is saved in, but when I try to compile the program, it says the file cannot be found. Here is my … | |
I'm trying to get a better understanding of ifstream, and was playing with it using the program below. It's purpose was to grab the first and last entries in the file, instead I get some perplexing output leading me to realize I've very little clue as to how streams really … | |
int rad; int rad; float PI = 3.14 ,area,ci; printf("\n Enter radius of a circle:"); scanf("%d",&rad); area = PI*rad*rad; printf("\narea of a circle is %f",area); ci = 2*PI*rad; printf("\ncircomeference of a circle is %f",ci); | |
I see a lot of people list code using this "::" as in: #include <iostream> int main() { std::cout << "Blah, blah, blah"; return 0; } and others use "using" #include <iostream> using namespace std; int main() { cout << "Blah, blah, blah"; return 0; } Is there a downside … | |
Dear all Can anyone explain to me how a (local) counter can be modified in a loop without being touched in the code? ... and how I am best to debug this? Thanks Erich void test(double *x, int l, int N, int K, double *p, Comp * y) { int … | |
Hello all: I have written a function that gets data (numbers) from a text file. My function works by taking a line from the text file, discarding unnecessary symbols, and putting the numbers into a vector. Here's a snippet: // Get data from text file. Values then put into one … | |
plz write this program for me write a program that input 2 time from the user and display the sum of this time in this format HH.MM.SS | |
Hi, I'm relatively new to C++. I'm trying to search for a double quote and replace it with 2 double quotes ( for CSV format conversion). The code compiles and works fine when Quote is any string. But it freezes when I try to search for a "\"". Help appreciated. … | |
I am having trouble understanding an external sort. I have to code up an implementation for the following below. I have to sort 120 records(they are really just integers), and have a memory restriction of 20 records. So I will have 6 blocks. Let me know if this is right: … | |
I started using C++ after learning Python, so I'm very very new to this. I'm writing a program and have 2 files in the project. I have my list.h class and my program. The list.h class, despite the fact that its a given class and should work, is ridled with … | |
I was wondering about something: LazyFoo, the author of some amazing SDL tutorials has put copyright on his source code. Does this prevent people from writing functions that are largely, if not entirely similar to his? For example, his 'load_image' function used in a lot of the tutorials is extremely … | |
**hello peeps and geeks, i am missing the MinSpanningTree function here.. any help please? need to fill up the function to get a) Minimum spanning tree cost for the graph b)Spanning tree path for the graph. E.g in matrix or adjancency list. ** #include <iostream> #include <ctime> // For time() … ![]() | |
What I'm trying to do is initialize a vector of objects, pass the vector to a function, then initialize a new object with a constructor. After setting the object members in the function, I add that object to the vector. The problem is the member functions aren't updating outside of … | |
I've implimented this snippet of code dijkstra_shortest_paths( g, name2v[tempName1], get(&VertexProperty::predecessor, g), get(&VertexProperty::distance, g), get(&EdgeProperty::weight, g), boost::identity_property_map(), // index-map std::less<double>(), // compare std::plus<double>(), // combine std::numeric_limits<double>::infinity(), // infinity 0.0, // zero do_nothing_dijkstra_visitor(), get(&VertexProperty::color, g)); to use dijkstra's on a map created from a text file, but I have no idea how … | |
Generic task: I am assigned to store student information in a binary search tree. I have a templated tree class, school class, and student class. The school class inherits from the tree class. The student class is on its own. Now, I want to encapsulate a student in a struct, … | |
Okay, so as ussual I'm having a lot of problems with a code and I need a lot of help along the way, but I'm just going to break it down into simple questions as I go. I am taking data from an input file that is a .txt that … | |
How can i write a C++ program which prompts the user to enter names of five countries , stores them in a 2D array,sorts them alphabetical order and prints them on screen. im unable to make it..plz help #include <iostream> using namespace std; int main() cout<<"Enter tha names of five … | |
Hi I have a little problem. I am having a project and i need to implement Dijkstra for a graph.So far it was ok but i have that problem when run it in g++ The code is where i think i have the error is here i think: if(!graph_list.at(start_Node->id)->path_list.empty()) { … | |
So, this is my coding, but when i insert data, i cannot update view / print input that i had inserted. And also, i had connect the database with NOTEPAD, but it does not appear. So, what is the problem? # include <iostream.h> # include <fstream.h> # include <iomanip.h> struct … |
The End.