49,755 Topics

Member Avatar for
Member Avatar for hemanshurpatel

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 …

Member Avatar for Tumlee
0
683
Member Avatar for Kumi_1

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

Member Avatar for Ancient Dragon
-1
1K
Member Avatar for ArashVenus

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

Member Avatar for ArashVenus
0
8K
Member Avatar for MisterGlow

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.

Member Avatar for mrnutty
0
176
Member Avatar for Aisha_1

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 …

Member Avatar for nahi
0
238
Member Avatar for samer.aboufakher.3

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

Member Avatar for samer.aboufakher.3
0
183
Member Avatar for haider885

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

Member Avatar for Ancient Dragon
0
619
Member Avatar for salah_saleh

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 …

Member Avatar for salah_saleh
0
184
Member Avatar for haider885

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 …

Member Avatar for Ancient Dragon
0
744
Member Avatar for princessophia

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 …

Member Avatar for ling_tj
0
285
Member Avatar for mixelplik

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 …

Member Avatar for mixelplik
0
1K
Member Avatar for Bilal93

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);

Member Avatar for vegaseat
-1
195
Member Avatar for mixelplik

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 …

Member Avatar for mixelplik
0
268
Member Avatar for MacErich

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 …

Member Avatar for MacErich
0
196
Member Avatar for Annettest

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 …

Member Avatar for haider885
0
392
Member Avatar for girmanigatu
Member Avatar for Slavi
0
136
Member Avatar for geotrixe

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

Member Avatar for Deepak_17
-1
151
Member Avatar for michelle.trinsky

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

Member Avatar for mrnutty
0
4K
Member Avatar for mythos061

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

Member Avatar for tinstaafl
0
279
Member Avatar for dp121307

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 …

Member Avatar for Ancient Dragon
0
291
Member Avatar for Jiggle

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 …

Member Avatar for Gabriel_2
0
328
Member Avatar for quitare
Member Avatar for Learner010
0
126
Member Avatar for electrodelic

**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() …

Member Avatar for Mouche
0
309
Member Avatar for ridunneii

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 …

Member Avatar for tinstaafl
0
339
Member Avatar for Jed_1

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 …

Member Avatar for Jed_1
0
833
Member Avatar for mythos061

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

Member Avatar for mythos061
0
201
Member Avatar for Jed_1

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 …

Member Avatar for mike_2000_17
0
910
Member Avatar for Builder_1

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 …

Member Avatar for Builder_1
0
1K
Member Avatar for spawn2004

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()) { …

Member Avatar for samer.aboufakher.3
0
383
Member Avatar for khelkely

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 …

Member Avatar for Moschops
0
174

The End.