49,757 Topics

Member Avatar for
Member Avatar for Builder_1

Simulate a patient’s lines using queues with enqueue ( ), dequeue ( ) and printQueue ( ) operations. Define a queue node in the following manner: typedef struct queueNode { int patientID; // Unique identifier; starts at 1; after 24 hours should be reset to 1 int checkupTime; // Random …

Member Avatar for Builder_1
0
377
Member Avatar for Auroch

Hello. I need to write a program to evaluate a definite integral with Simpson's composite rule. 1. ![fb9ac9a01f247c8a0ed8a606b7c10f4a](/attachments/small/4/fb9ac9a01f247c8a0ed8a606b7c10f4a.png "align-left") I know there is a Simpson's rule available in Scipy, but I really need to write it by the following scheme. 2. ![239643044a08379e5fe3747e13b2834e](/attachments/small/4/239643044a08379e5fe3747e13b2834e.png "align-left") , where a, b - limits of …

Member Avatar for Auroch
0
2K
Member Avatar for Wajid sardar

Source File not comiled error message occures #include <iostream> #include <stdlib.h> #include <time.h> using namespace std; main(){#include <iostream> #include <stdlib.h> #include <time.h> using namespace std; main(){ //declaraing and initialization integers int secretNumber = 0, UserNum=0; int UpperRange=0 , userMaxRand=0, LowerRange=0; cout<<"My Student ID Mc140402241 "<<endl; //Prompt the user to enter …

Member Avatar for Moschops
0
523
Member Avatar for AJones

Hi Folks: I just installed Dev-C++ 4.9.7 beta 7 and compiled a simple "Hello World" console app, I get a lot of error related to iostream.h file not being found. Dev-C++ is installed in C:\Dev-Cpp\ directory, Has anyone else have had this problem. Thanks AJ

Member Avatar for Wajid sardar
0
2K
Member Avatar for aluhnev

//Hi i do the delivery company project,this are my members of the base class //how do i create 2 constructors in base,one for sender and one for recipient? //I did one for sender ,but visual studio does not allow me to create identical for recipient //Can some one help to …

Member Avatar for rubberman
0
253
Member Avatar for redtribal23

Okay so first is I am confused with the void function. It is said that void function does not return a value. If for example I have a void function that gets user input, like price and month, how do I use price and month to do another function? int …

Member Avatar for redtribal23
0
146
Member Avatar for lewashby

When I compile the following two programs one of them compiles and one of themse does not but I don't see a difference. The smaller program is the same only I've taken out a lot of the code so that I'm left with only the minimum that I need to …

Member Avatar for mike_2000_17
0
3K
Member Avatar for magdaekeya

write a program that takes a four digits integer from user and shows the digits on the screen separately i.e. if user enters 7531, it displays 7, 5, 3, 1 separately.

Member Avatar for Maritimo
-2
78
Member Avatar for cambalinho
Member Avatar for cambalinho
1
213
Member Avatar for melisasimjiaqi

void ascending() { int i=0; const int SIZE = 20; DrinkRecord s[SIZE]; system("cls"); ifstream infile; infile.open("drinks.txt");//open your file if(!infile)//check to make sure its open before trying to initialize list items { std::cout<<"\nUnable to open file!\n"; } vector<string> list;//create your empty list while(!infile.eof())//while the input stream has not reached the end …

Member Avatar for Maritimo
0
203
Member Avatar for csnerd2020

So i have this class called Numbers and I want to be able to take in doubles or integers. I know i have to use templates but I'm confused can anyone guide me in the right direction. suppose i have private member functions set to int how can I change …

Member Avatar for Maritimo
0
187
Member Avatar for exoruel

Can anybody help me with my program? I can't get the example. Here's the question: Create a program that accepts an array of characters. And displays the converted array of characters into Upper case if it is given in Lowercase and vice versa. Don't use string, but char. Example: mychar …

Member Avatar for Maritimo
0
172
Member Avatar for dori24

I have to write a code on c++(dev c++ actually) that counts the number of each letter,and give a percentage of using for each letter....But i don't know how put a txt during the execution,because the txt is asked to be more than 1000 words.

Member Avatar for Maritimo
0
72
Member Avatar for DarkT

Hi everyone. I have a very simple question to which apparently there is no easy solution (I googled a bit but haven't found any yet). How can I force Visul Studio 2013 to install on a different drive so that it doesn't eat up my C: space? In our company …

Member Avatar for mike_2000_17
0
335
Member Avatar for Pyler

I can serialize an object if it's class definition has attributes. So if I have an object whose class does not have attributes, do I serialize the attributes importedi in it's class definition? For example; suppose I have the following class, #ifndef BREAD_H #define BREAD_H #include "EGGS.h"; #include "FLOUR.h"; class …

Member Avatar for mike_2000_17
0
275
Member Avatar for Lilgenski16

//BlackJack // Plays a simple version of the casino style game of blackjack; 1 - 7 players #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> using namespace std; class Card { public: enum rank {ACE = 1, TWO , THREE , FOUR , FIVE , SIX , SEVEN …

Member Avatar for Lilgenski16
0
230
Member Avatar for ashhhh

I'm a newbie in programing I've got this problem after I added timer on to the my program. I can't figure out what goes wrong. I just want to chekc if the timer can run or not. #pragma comment(lib, "SDL.lib") #pragma comment(lib, "SDLmain.lib") #pragma comment(lib, "SDL_image.lib") #include "SDL/SDL.h" #include "SDL/SDL_image.h" …

Member Avatar for Moschops
0
310
Member Avatar for schroaus

Does anyone know a way to remove the 0's from an integer? i.e 1320000 would be 132 and 540 would just be 54.

Member Avatar for schroaus
0
123
Member Avatar for diya45

hi everyone i have 1 question regarding array in c# application how i arrange numbers in ascending or descending order in array using c# software i do this int array=new int[1,2,3,4,5] furhter i cant processed plz can anyone tell me about this thankx..

Member Avatar for cronynaval
0
4K
Member Avatar for fidel.mcscort

What kind of softwares will a bank or financial company ask a programmers to create, and what programming language is best for creating such softwares. thanks to any answer

Member Avatar for mike_2000_17
0
105
Member Avatar for Jhon_3

I'm trying to read 2 files each has aprox 1MB but when I check for memory usage i get 2MB (this still persist for more file f*1mb) It is possible to read each file with minimum memory usage?

Member Avatar for mike_2000_17
0
93
Member Avatar for benali.benzazoua
Member Avatar for Moschops
0
62
Member Avatar for Lilgenski16

199 C:\Users\Gaming-PC\Desktop\C++ Files\Tic-Tac-Toe.cpp expected unqualified-id before "if" {//Tic Tac Toe //Plays the game of tic tac toe agaienst a human opponent #include <cstdlib> #include <iostream> #include <string> #include <vector> #include<algorithm> using namespace std; //global constants const char X = 'X'; const char O = 'O'; const char EMPTY = ' …

Member Avatar for NathanOliver
0
266
Member Avatar for nitin1

**{"title":"iamtitle","icon":"","urlHistory":["http://google.com"],"lastUsed":123}** I have tried in c++ and using json-glib. I have tried using this: g_type_init(); JsonParser *parser = json_parser_new(); json_parser_load_from_data(parser, temp.c_str(), -1, NULL); JsonReader *reader = json_reader_new(json_parser_get_root(parser)); json_reader_read_member(reader,"urlHistory"); JsonNode * value = json_reader_get_value(reader); JsonArray * value1 = json_node_get_array(value); const char * urlhistory = json_array_get_string_element(value1,0); tab.history = urlhistory; json_reader_end_element(reader); cout << …

0
310
Member Avatar for Anitha Nair

how to create a c++ program to add two complex number using the concept of passing and returning objects in member function

Member Avatar for NathanOliver
0
124
Member Avatar for nadia.batool.56863

i have to write a code on automata. the question is in conway's game of life, cell in a grid are used to stimuate biological cells. Each cel is considered to be alive or dead.At each step of its simulation, each cell's current status and number of living neighbours is …

Member Avatar for NathanOliver
0
123
Member Avatar for usmanjani

open c++ file how to open a c++ file using c++ program for example i am making a c++ code checker or edit using c++ program first i need to open c++ file and extract the whole program in the text form to string ,thanks if anyone can help

Member Avatar for Search_not
0
81
Member Avatar for ckide

What are the areas (uses) of the use of the language of C/C++? i want advanced uses of c/c++ to choose the best for me and for the future.

Member Avatar for Maritimo
0
468
Member Avatar for rela

I need to have the same following format of dadat, which are read in a text fil, in output. "Mainnumber" is the first number of each matrix (1,2,3) and for each "mainnumber" (i), the number of rows are determined for each (i) by ("nof_row_per_mainnumber[i]"= numberof_rows;). For every "Mainnumber" (matrix) it …

Member Avatar for tinstaafl
0
264
Member Avatar for david.nicely.393

• Need help with writing an algorithm: • Department Store Sale! Prompt the user to enter the sticker price of each of the clothing items they’re purchasing (make sure all input prices are positive). The user should be allowed to purchase as many items as he or she would like. …

Member Avatar for sneekula
0
137

The End.