49,757 Topics
| |
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" … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
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. | |
how can i make a program by using like this(2*5/6+3-8*3/2)to get the sum of them? | |
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 … | |
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 … | |
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. … | |
How do you contrive an algorithm which solves quadratic equations? | |
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 … | |
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 … | |
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 } | |
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. - … | |
//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 … | |
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 … | |
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. | |
# 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 … | |
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 | |
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; … | |
//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. … | |
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, … | |
Implement the ObjectIterator ADT to the NodeList class and complete print function.Guys HElp !! | |
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 … | |
what is answer for c++ function named FACTORIAL the will determine the factorial of number f=1x2x3.....n | |
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 = … | |
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 … | |
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 << … |
The End.