49,761 Topics

Member Avatar for
Member Avatar for mario.delchev.5
0
30
Member Avatar for andruluchko

Hello, I have to implement an overloading insertion and extraction. My fields are char, char and float. I met some problems with data types. How can I use overloading insertion/extraction with strings? Can You state the mistakes in my code? Thanks // laba8pop.cpp : Defines the entry point for the …

Member Avatar for Moschops
0
185
Member Avatar for fo0fo0.com

what is answer for c++ function named FACTORIAL the will determine the factorial of number f=1x2x3.....n

Member Avatar for ddanbe
0
63
Member Avatar for michelemalta

This code might be a bit vague, but this question is regarding an assignment I have to turn in and will be checked for plagerism so I will just give the jist of my problem. bool x = false; while (x == false) { } if (conditions) { x = …

Member Avatar for rubberman
0
158
Member Avatar for skuller74

I am writing code to simulate a queue at a bank, which calculates the average wait time of all customers that enter the queue. I'm getting a STATUS_ACCESS_VIOLATION at line 56 of program3.cpp. I've had this error before and I'm pretty sure it happens because of an attempt to act …

Member Avatar for Inderjeet_1
0
8K
Member Avatar for Dex02

Hello guys i need some help, i need a program to read a text file. I write this: [code]#include <iostream.h> #include <fstream.h> #include <cstring.h> void main () { int is_open; string line; ifstream myfile; myfile.open ("a.txt"); if (myfile.is_open()) { while (! myfile.eof() ) { getline (myfile,line); cout << line << …

Member Avatar for senthil_5
0
1K
Member Avatar for Sunil_12

Hello All, I have writtern a c++ code to implement Koch Snowflake pattern using recursion. The code written compiled well but did not run saying linking error for some variables as shown below: ============================ 1>kosh_snowflake.obj : error LNK2019: unresolved external symbol _moveto referenced in function "public: __thiscall RecursiveCurve::RecursiveCurve(void)" (??0RecursiveCurve@@QAE@XZ) 1>kosh_snowflake.obj …

Member Avatar for Sunil_12
0
314
Member Avatar for Syafiq_1

Given functions in Figure 3, write a program in C++ to insert nodes in a linked list in ascending order. Values for node will be entered by user. Your answer should include code to find previous node when insertAfter(node *previous,node *newNode)is called. ![094d4b79872858cd76c4830f50d6c6cf](/attachments/large/4/094d4b79872858cd76c4830f50d6c6cf.JPG "094d4b79872858cd76c4830f50d6c6cf") Please someone tell me how im …

Member Avatar for Aswad_1
0
124
Member Avatar for kortneycoles

I'm working on this code for class, I am not expecting anyone to do my homework but help would be appreciated. Nodes are confusing for me and my professor did not explain well. The errors I am getting are where I declare the functions, I dont know the nodeType(?) that …

Member Avatar for nataraja833
0
334
Member Avatar for Search_not

I am trying to overload enum types so that I can get input and show output using these enum types... My program bombs out when I run it, please help. Here is an example of what I am trying to do (a rock classification program): #include <iostream> #include "classify.h" using …

Member Avatar for Search_not
0
3K
Member Avatar for usmanjani

hello please help me on the assignment i cannot recognise the classes and a little functionality of the classes+ how stimulate the scenerio in each class and how to set predicate function, multiple classes....... with ?????please help me urgent [Click Here](http://www.scribd.com/doc/245021293/Assign-Emt-1)

Member Avatar for jwenting
0
126
Member Avatar for Johnnie_1

Hey guys, I am currently taking a c++ class and I have an assignment that I am really struggling to understand. I kinda have an idea of what the assignment is asking, but I just dont know how to put it together in a program. I dont know where to …

Member Avatar for rubberman
0
217
Member Avatar for Inderjeet_1

The simulator will simulate one or more line-ups for customer service at a business. In the default setup, it will take between 1 and 6 minutes for a customer service request to be handled (random) once a customer reaches the front of the queue, after which the customer will leave. …

Member Avatar for Inderjeet_1
0
131
Member Avatar for rela

I have a code that read some input data from a text file, and I want to add a loop using WriteModel() to print out the same data like the same format in the text file, can you help me how to do that?

Member Avatar for rela
0
172
Member Avatar for shahera.arafat

hi :) I have a pro. here>>I have to write a prog. to get info. from a file and then to take these info. and to put them in a tree >> so what happened here ,,that the compiler reads the info. correctly from the file and take them ..but …

Member Avatar for shibmk
0
187
Member Avatar for Diellza

Dear all, I need the code for counting sort algorithm but I try this code but is not working #include <iostream> #include <conio.h> #include <time.h> #include <stdlib.h> //srand and rand functions using namespace std; void add_random_numbers(long arr[], long b); void countingSort( long left, long right, long vector[], int k, long …

Member Avatar for deceptikon
0
789
Member Avatar for HuePig

Hi, I have a `std::string getName(){return name}` function and `std::string name` is a private variable. The problem is that when ever I try to `getName() == object` , the statement is always `false` even when the values are the same. if (command.compare(0, 4, "get ") == 0){ std::string object = …

Member Avatar for Search_not
0
247
Member Avatar for Diellza

How to make the code with Random numbers and Time Executation? #include <iostream> /* cout */ #include <cstdlib> /* srand, rand */ #include <ctime> /* time() */ #include <list> /* list */ #define BASE 10 // # of buckets to use #define ARRAY_SIZE 50 // max # of elements in …

Member Avatar for Diellza
0
615
Member Avatar for Diellza

I want to write a code for Radix Sort based in this way how I made the Quick Sort, how can I do with Radix Sort, can anybady have any idea I have search a lot but I can not find any exactly what I need #include <iostream> #include <conio.h> …

Member Avatar for David_50
0
615
Member Avatar for xaxl1x

Hello, I am having some serious difficulty trying to create a class in a header file. I have found that when using the #ifndef I will recieve an error message stating "unknown type name 'class'", however if I use #ifdef it will compile with no problem but has linking problems …

Member Avatar for NathanOliver
0
121
Member Avatar for ayesha.newtn

Write a function called mostIntersecting which receives as parameters three arrays of type float, and an integer n; where n is the size of each array. The first two arrays are called X, and Y and contain the x and y coordinates respectively of the centers of n circles on …

Member Avatar for David_50
0
205
Member Avatar for sarauta
Member Avatar for Diellza

I want to make this code with random numebr array and time executation? Does anybady nows how can I do? #include <iostream> using namespace std; void print(int a[], int sz) { for (int i = 0; i < sz; i++ ) cout << a[i] << " "; cout << endl; …

Member Avatar for Diellza
0
285
Member Avatar for Chay_1

I am reading books to improve my C++ and I wanted to try to get the leftover input from the input buffer after using the delimiter in getline(), this code works, it skips the cin statement and outputs the leftover buffer contents but my question is will it always do …

Member Avatar for NathanOliver
0
465
Member Avatar for Glaven

Hii,, I need to make a program that takes in a user’s number and keep dividing it by 2 until it is 1.I need to display the division steps i'm kinda new to c++ and i do not know how to keep making it divide by 2 until 1 i …

Member Avatar for NathanOliver
0
726
Member Avatar for Diellza

I want to do one example of Radix sort generating random numbers and timing. Can anybady help me? Here is the radix pseudocode function radixSort(String s) for i in (s.length - 1) -> 0 do stableSort(s[i])

0
177
Member Avatar for Jfunch

The problem I am trying to solve is Write a program using fork() to compute average of N numbers. The parent process forks a child process that takes input from the user, adds all the numbers and returns the sum and the count of numbers to the parent process that …

Member Avatar for Kyle_4
0
3K
Member Avatar for Search_not

How do I overload the cout and cin operators so as to get input and show output using an object? Heres a simple example of what I'm trying to do: class Temp{ double fTemp; public: double FahrToCelsius(double fTemp){ return (fTemp - 32.0) / 1.8; } friend std::ostream operator<<(std::ostream Out, const …

Member Avatar for Search_not
0
771
Member Avatar for Fil_1

I have been trying to make this code work for some time now. I have had an issue geting a return from toBinary. I have all of the needed includes so do not worry about them. I am some what new to C++ and even to programing in general so …

Member Avatar for ddanbe
0
245
Member Avatar for usmanjani

question Identify the objects and simulate the following scenario.Your Code must have all constructers, Exception Handling, predicate functions ,wrapper functions ,settrs and getters.Use proper names for functions, classes and variables image below.[Click Here](http://postimg.org/image/706icwycf/) please tell me what to do with this:::????

Member Avatar for usmanjani
0
313

The End.