49,756 Topics

Member Avatar for
Member Avatar for FutureWebDev

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 …

Member Avatar for FutureWebDev
0
185
Member Avatar for Awah Mohamed

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 …

Member Avatar for Basteon
0
323
Member Avatar for Marissak

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 …

Member Avatar for Marissak
0
198
Member Avatar for benny2010

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 :)

Member Avatar for myk45
0
186
Member Avatar for chamika.deshan

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: …

Member Avatar for chamika.deshan
0
106
Member Avatar for rj2910

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 …

Member Avatar for mrnutty
0
101
Member Avatar for hao90

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 && …

Member Avatar for hao90
0
101
Member Avatar for modjoe

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 …

Member Avatar for daviddoria
0
500
Member Avatar for mpike

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 …

Member Avatar for Dingbats
0
403
Member Avatar for Theanonymous

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 = …

0
72
Member Avatar for CrazyPixel

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. …

Member Avatar for jonsca
0
165
Member Avatar for MarounMaroun

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!

Member Avatar for frogboy77
0
93
Member Avatar for localp

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 …

Member Avatar for localp
0
242
Member Avatar for amit_tare1

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 …

Member Avatar for seanbp
-1
143
Member Avatar for bookmark

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 …

Member Avatar for MasterGberry
0
125
Member Avatar for lochnessmonster

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

Member Avatar for jonsca
0
81
Member Avatar for bookmark

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 …

Member Avatar for jonsca
0
123
Member Avatar for kuksa1994
Member Avatar for seanbp
0
50
Member Avatar for bookmark

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 …

Member Avatar for bookmark
0
257
Member Avatar for bookmark

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 …

Member Avatar for bookmark
0
212
Member Avatar for steve_Student

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 …

Member Avatar for sakijr
0
174
Member Avatar for seanbp

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] …

0
329
Member Avatar for by_stander

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 …

Member Avatar for jonsca
0
220
Member Avatar for sanjuanair

Frndz, I want to now how to start learning C/C++ programming in my pc. means there is a problem with installation of normal turbo c in my computer. it is not working. [COLOR="Green"]So what software i have to install? From where i can download it? Is there any C++ software …

Member Avatar for seanbp
0
112
Member Avatar for johngalt10

I'm new to scripting. I'm trying to find out how to target my cout to a field in a gui. Any direction will be greatly appreciated.

Member Avatar for jonsca
0
96
Member Avatar for christos312

Ok this is very strange and i cannot see where is the problem and i guess is really easy but i cannot see it so i will need your help :-O My Declarations [CODE]int myGraph[4][4]; int vertices[4]; char path[4];[/CODE] My initialize code [CODE]for(int i=0; i<=4;i++) { for(int z=0; z<=4; z++) …

Member Avatar for christos312
0
150
Member Avatar for yatman

I have a function below which is supposed to read from a continuous updating file...by another program. for this reason I used a fileptr int to keep track of the last known good read so this index value is updating correctly but it is not being used by getline. and …

Member Avatar for vijayan121
0
156
Member Avatar for helpfullProgram

Hello everyone! I am programming a vector which stores a name and a number. [code] typedef pair<int,string> Users_Pair; vector<Users_Pair> Users_Name; [/code] And the vector expands and contracts through out the life of the program. But when I use erase all elements above the one being erased loose their string? I …

Member Avatar for Narue
0
195
Member Avatar for sdinu96

Hi everyone I want to open the Directory like this using C++ in linux eg : /proc/1/status where proc and 1 is a directory and status is a file,which i want to access(i.e)this file i have to copy to an string to access some information..................can anyone help

Member Avatar for Ancient Dragon
0
64
Member Avatar for networkZombie

...so I'm trying to make a program that takes in the three sides of a triangle and then decides whether the triangle is equilateral, isosceles or equilateral. I have to have 2 different functions and I can't use global variables ( That's what my teacher wants ). My main function …

Member Avatar for Dingbats
0
268

The End.