49,761 Topics

Member Avatar for
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
Member Avatar for samson.dadson.3_1

the problem I have here is: when I input an integer it works fine, but when i input any other thing, it doesn't give me a chance to input again when the loop iterates, it just keeps printing "error type the right thing" to the screen even though "cin var" …

Member Avatar for samson.dadson.3_1
0
2K
Member Avatar for nitin1

Does C++ consider \/ as an escape character? And does Java consider it? I am talking about forward and backslashes. Please tell. How does Java and C++ considers them differently? I mean : in C++: this '/' works fine without escape. in Java: this '\/' will result in '/'. Is …

Member Avatar for nitin1
0
236
Member Avatar for nitin1

I am creating one json array using Json-glib using c++. Here is the data: title="Daniweb" (string) last= 1234 (long) icon="icons" (string) url = "[\"dani.com\"]" (json array) After making one json array using exsiting APIs of json-glib library, I got this: {"id":"Nitin1","clientName":"Gourav_first_task","tabs":"[{\"title\":\"Daniweb\",\"icon\":\"icons\",\"urlHistory\":\"[\\\"Dani.com\\\"]\",\"lastUsed\":1234}]"} Is it the correct json string made? It has …

Member Avatar for mike_2000_17
0
178
Member Avatar for jsussarredondo

I need to read data from a file given to me by using an array. Data in file looks like this: "Jones C A B B D A B C A A C B A D D C A C A D I'm making an Exam Grader program but I …

Member Avatar for Maritimo
0
143
Member Avatar for saeed.albahri1

Hello C++ Nerds! I am creating a list using Arrays. And I want to have AddItem, DeleteItem functions in those lists. But as you know, you can't delete an element from an Array because it's a fixed size. But we can shift all the left elements by one place and …

Member Avatar for Maritimo
0
331
Member Avatar for coder43

test.txt : 18 19 20 21 22 23 22 23 24 23 24 25 24 25 26 25 26 27 28 29 30 29 30 31 I want to read in the integers in test.txt as strings then create a vector of 3 ints. If that makes sense, so the …

Member Avatar for mike_2000_17
0
161
Member Avatar for David_50

I worked for 20 years in hardware and twenty odd now in software, so change is an old friend. I consult on UNIX/LINUX to a variety of industries, write lots of bits for my own needs, love to help others over their hurdles.

Member Avatar for JorgeM
0
230
Member Avatar for rebintahsin
Member Avatar for rela

I wan to wirte in cout << ... to have the matrix in output in the same format that I wrote it in text file like this: 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 class Classname { double data[3][3]; public: void Read(char …

Member Avatar for rela
0
2K
Member Avatar for Simon180

I know everyone on Daniweb are talented but am looking for a person that knows both delphi and c++/c# to help convert some code into delphi for a reconversion of a program we have been trying to revive and get running. so am hoping there some one on here that …

Member Avatar for happygeek
0
138
Member Avatar for Nana_29

here is the program exercise: Write a program to help a local restaurant automate its breakfast billing system. The program should do the following: a. Show the customer the different breakfast items offered by the restaurant. b. Allow the customer to select more than one item from the menu. c. …

Member Avatar for Nana_29
0
3K
Member Avatar for melusi_1
Member Avatar for Moschops
0
132
Member Avatar for Sadiiiiiiiiee_1

hi, guys i am creating a game that consist of 3 enemies and one player. i want to create a battle function were the player starts with a 100 points and each enemies 50. i got the function created but i cant seem to get the player fight with each …

Member Avatar for Search_not
0
73
Member Avatar for Tehmina_1

Suppose a company Oraflex organizes interviews for a vacant post. Assume that the interviews of the successful candidates after short listing has been started and interview marks are being assigned. You being software developer of the company are assigned a task to prepare candidates’ list that will store candidates’ information …

Member Avatar for Search_not
-2
84
Member Avatar for Sadiiiiiiiiee_1

hi guys i am a beginner at programming, what does the first line of this code does?....i know the second line generates a random number between 0 and 10 but i am not sure what the first line does....please explain for(int index=5; index<10; index++) {random_integer = (rand()%10)+1 }

Member Avatar for Sadiiiiiiiiee_1
0
94
Member Avatar for aida.atef.31

Here's the problem (i know it's really easy "it's for beginners") You will be given two numbers X and Y and you will have to define the relation between them. It can be one of the following relations : - X greater than Y. - X smaller than Y. - …

Member Avatar for vijayan121
0
251
Member Avatar for Jesse_4

//I need help on where to go from here, mostly in the main. //The instructions and requirements can be found in the attachment. /********************************* Queue header file ********************************/ #ifndef QUEUE_H #define QUEUE_H #include <iostream> using namespace std; class Queue { private: class QueueNode { friend class Queue; int value; QueueNode …

Member Avatar for David_50
0
1K
Member Avatar for Diellza

Dear all, I have created a code for QuicSort algorithm with random numbers and time executation but now I want to do for Countin sort And I don't know, Can anybady help me based in this example. Thanks include <iostream> include <conio.h> include <time.h> include <stdlib.h> //srand and rand functions …

Member Avatar for David_50
0
697
Member Avatar for furalise

Hello there everybody... I want to ask if there is a book on creating C++ libraries. I thought a good approach to manipulating and using existing libraries is to learn the intracecies of creating and building them.. Any hints? Thanks.

Member Avatar for Moschops
0
178
Member Avatar for PawelBujak

# Introduction # It allows all programs to potentially operate on data managed by this engine. Its structure is similar to Windows Registry with a difference, that it also supports BLOBs and its size is not limited. It could be used instead of filesystem directly. The equivalents of registry keys …

Member Avatar for PawelBujak
0
396
Member Avatar for irfani619

Write a function smallestNumber, that takes as parameters an int array and its size and returns the smallest element in the array. Also, write a program to test your function

Member Avatar for Search_not
0
58
Member Avatar for HuePig

Hi, I have a rock object. Right now all it does is fall from the sky. I made 10 of them and put it in a `std::vector<rocks*> rock_v`. The rocks have random x position but start at the same height. I generate the rocks like this: for(int i = 0; …

Member Avatar for HuePig
0
775
Member Avatar for aluhnev

//Hi all,can someone help with this problem //I am stack,need to output all functions in main,with user input for queue and stack,but first queue //This is my .h and .cpp of queue #include "stdafx.h" template <class ItemType> struct NodeType; template <class ItemType> class QueType { public: QueType(); // Class constructor. …

Member Avatar for richieking
0
199
Member Avatar for Waqas Ahmad

How to solve this Cpp programming program Create two arrays and pass them into a function by reference. The function should reverse the first array and place it into the second array (as below). Arrays when passed into function Array1: 1, 2, 3, 4, 5 Array2: 0, 0, 0, 0, …

Member Avatar for llgms
0
153

The End.