49,761 Topics
| |
Hi there, im trying to create a quiz program in c++. I need to have an array within a struct as i need to store a question title, ten possible answers and the points that each answer is associated with any help about how to go around declaring this would … | |
hey this is a just for fun topic (a.k.a. NOT homework) but if you can please reply: I am working in Visual C++ and I can't get any <iostream> operation to write a single character to a variable and then check it in an if() statement. Here is my last … | |
Hi everyone, I want to write a code in C++ so i want to knw information about /proc in liux . where if we give the command "top" in terminal it will show all currently running information like this if i want to display these information using C++ code .so … | |
Hi. I have this very weird problem. The function getOps in the code below always returns 0, although it should be returning the ops value which gets calculated correctly. [CODE] int ops; int getOps(int n, int m) { if(m == n) return ops; else if(m - 2 <= n) return … | |
Hi.. I want to write a C++ program which reads a text from the user and change any uppercase letter to an lowercase letter and assign them to an stack?? please help.. | |
Any suggestions on open source project i can contribute to or begin on my own? Nothing complicated - am just a beginner and would like to improve my knowledge. | |
I already know how to use fstream. I know to save the value variables to a file, and I also know how to make the program display the information in the file, but my problem is that it saves the content of the variable, not the variable itself. Here's what … | |
The program takes 10 numbers of type float, which are entered by the user, and outputs the average ( also of type float ) of those 10 numbers. If I am going to test a range of values for those ten number, am I correct to test the highest values … | |
hey people , i am a c++ biginner , i am self tought , this mean i have no teacher to help me . now i arrived to graphics . but i have got a small problem , i am programming with my laptop. my laptop is a mini laptop … | |
| Hi everyone. I am trying to write a recursive maze program. I have the program without the recursion but I am having a hard time putting the recursion in there. This is the regular code: [CODE]#include <iostream> #include <string> #include <stack> using namespace std; template<class T> class Stack : public … |
Hello does anybody know how to scale a sprite or image to fit the whole render window? at the moment i have my checkers board but its in one corner of the window and i want it to fit the window entirely would be a great help :) | |
Hello I am in a difficulty in finding the size of array. In following program I am passing the arraysize and the array as a parameters. Instead of doing that can I find the array size in the method? [CODE]template <class T, typename ReturnType = float> class TEnterImp { public: … | |
object for test class can be created as test t=50; // y so..how can integer be equal to object?? // don't we need to call any constructor here or is it some trick of visual studio??...and if it is then how is it possible?? class test { public : int … | |
Can anyone teach me how to assign a empty array to zero? Which means that some of the c[x][y] have not assigned to a value. [CODE]int x = 4; int y = 4; a[x] = {30,40,50,60}; b[y] = {100,20,60,40}; c[x][y]; int i = 0; int j = 0; while(i<x && … | |
Ok, so i have an assignment due in 9 hours, its about computing the shortest paths from a vertix input by the user to all other vertices. The adjacency matrix is supplied from a text file, so I have done the following code: (Some of it was given for me … | |
ok so theres 2 things i need help with. in my code i have a random dynamic array with sides a minimum of 9 and max of 20. in this array i need to spawn characters randomly (here's where i need help) how can i randomly spawn characters in a … | |
Hi I have to implement this code parts [URL="http://www.daniweb.com/forums/attachment.php?attachmentid=18567&stc=1&d=1292681569"]first code[/URL] [URL="http://www.daniweb.com/forums/attachment.php?attachmentid=18568&stc=1&d=1292681569"] second code[/URL] [URL="http://www.daniweb.com/forums/attachment.php?attachmentid=18569&stc=1&d=1292681569"]third code[/URL] at my code for linkedbinary tree [CODE]#include <iostream> using namespace std; template <typename Object> class LinkedBinaryTree { protected: struct Node { Object element; Node* parent; Node* left; Node* right; Node() : element(Object()) { parent = … | |
Hello. First of all, I'd like to say that this is my first post. I have indeed searched this forum for code snippets and help, but never thought I'd have to post anything, since I could easily search for someone who's had the same problem and fix my own code. … | |
Hello folks, How can I fill a 2D-array (of size [1260][4]) with all variations of 1-10 (which is 5040 variations)? 1 2 3 4 1 2 3 5 1 2 3 6 .. .. 1 7 4 9 .. and so on.. Thanks! | |
I need to code a C++ program to execute the tab control of the keyboard through the code. I am expecting when the tab control of the code gets executed, we should be able to navigate throught the web page through it. for example, take a web page, and we … | |
hello, I am Amit tare (India) currently i am working with the C++ server. which having the facilities of:: run on all the platforms(Operating systems), memory management, thread safety, and handlers.... pooling features...... I am using VC++ IDE on Windows platform.... [B]please help me to build the core features of … | |
Hi I have this code with a function that outputs a square filled with the given char but for the [CODE] square(4);[/CODE] I want it to just output a square like this [CODE] **** **** **** **** [/CODE] How would I do this without changing the function definition or using … | |
How would i read a files bytes into a buffer in my program to compare them with another string a bytes? what methods are possible that i have available using c++ standard and/or the windows api -thx | |
Hi. This program has a function that divides an unsigned arg by another unsigned arg. I want it to only keep outputting "I'm really upset" after the first time it outputs "I'm really upset". Right now it outputs as [CODE] 5 0 I'm really upset 6 Press any key to … | |
:-/ c++ program having included all functions combined is needed. can somebody help..?? | |
Hi I'm trying to make a program that returns the number of letters in a string but it seems that the function I have is not working as it returns 0 every time. Can someone check what I'm doing wrong? Thanks in advanced. [CODE]#include<iostream> #include<string> using namespace std; unsigned letters(const … | |
Hi, I have this program that outputs a triangle when given the size. Right now the triangle outputs like this [CODE] 5 * ** *** **** ***** [/CODE] Does anyone know how I would make it look like this? [CODE] 5 1 12 123 1234 12345 [/CODE] Thanks in advanced … | |
Hi i have created a program for my college assignment which asks to create a program for a telephone company that requires the program to calculate call charges for their customers, and also give discount calls depending on the time of day and day of the week. The assignment also … | |
These days, it's usually unnecessary to consider how much memory to allocate for a string input. This was mostly for fun. This code allocates memory as the user inputs each key stroke, then allocates and returns a string pointer when the user presses enter. Tell me what you think! [B]USAGE:[/B] … | |
Hey everyone, I have a Matlab code that parses data from a csv file, performs some calculations on the data, and spits it back out into a new csv file. the new csv file contains all the data from the original file, with the new calculations appended on at the … |
The End.