49,757 Topics

Member Avatar for
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
229
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
696
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
394
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
197
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
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

The End.