49,761 Topics

Member Avatar for
Member Avatar for ravi1986

write a programme that creates a two dimentional array initialised with test data. use 4 rows and 5 columndatatype. the programme should have the following functions: 1.getTotal:- this function should accept a two dimentional array as its argument and return the total of all the values in the array 2. …

0
73
Member Avatar for SacredFootball

Hey all. I don't have any experience with vectors so I'm looking for a little guidance. I don't want the answer, just a direction to take. I've looked up vectors on cplusplus.com but I couldn't understand exactly how they work in order to code them into my program. Here's my …

Member Avatar for VernonDozier
0
127
Member Avatar for Lukezzz

Hello, I wonder if it is possible to have opacity on a textBox control. What I initially is trying to do is that I have a multilined textBox where a lot of text is written and behind this textBox there is a panel with an backgroundimage that I would like …

0
59
Member Avatar for Dewey1040

I wrote a program which creates an n-ary tree using the left child right sibling approach. Each node of the tree is labeled by a dynamically allocated array of ints. I am currently having a problem where if I am searching for a node labeled 1 2 3 4 5, …

Member Avatar for Dewey1040
0
81
Member Avatar for icelantic

I have to write a template function that tells me if two binary trees are equal in structure and in data. However whenever i call the function in my testing code, it tells me I have an undefined reference to it. I'm not sure what this means or how to …

0
40
Member Avatar for smcp

Hey guys, I'm looking to add on to a recent program of mine that uses classes. My next step is to add in a working overloaded equality function in order to compare the gross pay of two Employees within the class. Now, I've read up on this quite a bit …

Member Avatar for mbulow
0
720
Member Avatar for ashish.men

Hi, I am trying to create an automated trading system and am fetching data from an API (interactive brokers) API. I need to store 30 nodes of tick data( Tick is a reference type struct I have created) and store it in a linked list. When i start the system, …

0
92
Member Avatar for rootchord

Writing a function to search an array for a value and return the index if found. in finding what the size of the array is for use in the while loop condition i found that here inside the templated function sizeof(data) comes back as 4(it should be 40) but when …

Member Avatar for green_frog
0
507
Member Avatar for bgx90

Can anyone tell me why setprecision is causing this error at runtime: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted The program ran fine; after I added << setprecision(2) << to a series of output, I received the error when trying to run the program. I have …

Member Avatar for bgx90
0
115
Member Avatar for nats01282

Is it possible to create a piece of code that can learn? like a robot? e.g if it see's a picture of me, the code will learn and understand that the picture is me every time it see's it??

Member Avatar for nats01282
0
104
Member Avatar for PTRMAN1

I'm having a bit of a problem using enum variables. The program below compiles just fine, but the output program at the end is blank. Any hints? [CODE]// Program Reformat reads characters from file DataIn and // writes them to DataOut with the following changes: // all letters are converted …

Member Avatar for PTRMAN1
0
171
Member Avatar for LevyDee

So im exploring what a binary search is, and I just would like a few opinions on what I belive a binary search is. So the way I see it, a binary search is nothing more then an algorithm that starts at the middle of an ORDERED list(array or otherwise), …

Member Avatar for mrnutty
0
87
Member Avatar for tallygal

Can someone tell me if this is write? Rewrite the following if/else/if structure as nested if elses. [code] if (status == ‘P’ && amount >= 10000) due_flag = true; else if (status == ‘P’) time_remaining - = 1; else if (status == ‘O’) { time_remaining = 0; warning_flag = true; …

Member Avatar for tallygal
0
89
Member Avatar for SacredFootball

full function: [CODE] void finalScoreMessage(bool prematureExit) { if (finalPoints_ > highestScore_) { cout << "You've beaten your previous high score! The new high score is: " << finalPoints_ << endl; saveScore(); } else if (finalPoints_ <= highestScore_){ cout << "Your score is: " + finalPoints_ << endl; cout << "Your …

Member Avatar for SacredFootball
0
106
Member Avatar for SacredFootball

hey all. I've been banging my head on this for hours. I'm trying to get only whole numbers from a user and if they input anything different, I want it to display a validation error and restart the function. Here's what I have: I'm either getting an infinite loop of …

Member Avatar for mitrmkar
0
18K
Member Avatar for decoy684

Hello everyone, I am starting to run completely out of time on an assignment that is due tomorrow. No I'm not asking for free code here, because I already have it 99% complete. My assignment is to read a text file into an array and bubble sort them from highest …

Member Avatar for rurouni
0
287
Member Avatar for skorm909

ive heard people using somthing like[CODE]#include <windows.h>[/CODE] so that its not in the command prompt and its in a window the size the person making it selects

Member Avatar for mitrmkar
0
82
Member Avatar for Twonk

I have no error or warning when compling this code but as you can see it keeps changing one of my inputs (int ID) into a random number. This same number is still the output when i change the imput. code: [CODE]#include<iostream> #include<string> #include<sstream> using namespace std; class student { …

Member Avatar for Twonk
0
109
Member Avatar for Krstevski

Hello friends, if someone wants to help me with one task. (I want example) The task is: One calculator can make two operations (multiply and subtract). Return the minimum number of operations needed to get to target (or -1). Example: Your multiply number is 5 Your subtract number is 7 …

Member Avatar for gusano79
0
137
Member Avatar for atmc

Hiii I am trying to dis program but i gives me an error.....i donno wat 2 do in this forum....plzzz hep me[code]#include <iostream> using namespace std; int main() { cout <<"Enter 10 digits"; int a[]= new a[10]; for( int i=0;i<10;i++) cin>> a[10]; int small,big; for(int i=0;i<10;i++) { if (a[i]<10) small+=a[i]; …

Member Avatar for Sodabread
-2
84
Member Avatar for VilePlecenta

I have tried resizing the taskbar with all the normal Windows APIs SetWindowPos MoveWindow SetWindowPlacement But to no avail. The taskbar does not even flinch, what would be a good way to adjust it in its width, height, pos.

Member Avatar for VilePlecenta
0
103
Member Avatar for brain007

Make a project, consisting of 3 modules: student.cpp, course.cpp and register.cpp. Write source and header file for a program that registers students for courses. Design a class student that stores the name of the student, the id number and array (vector) of all course numbers for which the student is …

Member Avatar for Salem
-1
376
Member Avatar for brain007

Make a project, consisting of 3 modules: student.cpp, course.cpp and register.cpp. Write source and header file for a program that registers students for courses. Design a class student that stores the name of the student, the id number and array (vector) of all course numbers for which the student is …

Member Avatar for Sodabread
0
2K
Member Avatar for tarheelfan_08

Hey guys, I am running the following program and when I do it only shows the Gold Skate Board, can someone please tell me what I am doing wrong with my dynamic stack and why this does not work! It looks just like my other program! [code] #include <iostream> #include …

Member Avatar for mbulow
0
79
Member Avatar for ajjg123

My assignment is to make a recursive bubble sort, but I'm not allowed to use any loops.... In fact, the only loop I can use is in the main when I call the function. I'm totally clueless as to what to do. This was an example of a bubble sort …

Member Avatar for ajjg123
0
446
Member Avatar for pedro2010

Hello, Could anybody please help me soon: In C++, a number x= 367.1234444444444444444. I only want to get x=367.123 or x=367.1234 (some digits after the sign ".") Which function to get it? Thank you in advance. Pedro

Member Avatar for mrnutty
0
97
Member Avatar for karthz85

[CODE]#include<iostream.h> #include<fstream.h> #include<string.h> #include<stdio.h> class database{ public: virtual double store_data(void); virtual double GetPassingMark(int pass); virtual void display(void); virtual void edit(void); protected: void data(void); //database() //~database() }; double database::store_data(void) { char code[100]; double totalmark,laboratory,exam,assignment,sum_assignment; int i,no_of_parts,a,pass; totalmark=0; ofstream display("D:\\record system.txt"); for(i=0;i<7;i++) { cout<<"=======================================================\n"; cout<<"1.enter the subject code"<<i+1<<"\n"; cin>>code; cout<<"2.Enter no of …

Member Avatar for Nick Evan
-2
95
Member Avatar for blumarker

Hello, I've been trying for a few days now to apply different icons from an ImageList to a ListView Control. Problem is, Only the first added Icon shows up in the ListView. [CODE] HWND hWndListView = CreateWindow(WC_LISTVIEW, "", WS_CHILD | LVS_REPORT | LVS_SINGLESEL | WS_BORDER | LVS_SHAREIMAGELISTS, 10, 10, 450, …

0
31
Member Avatar for am5a03

What I want to do is: change the array a[] = {1,2,3,4,5} to a[] = {5,4,3,2,1} by recursion [CODE]void reverse(int *a, int size){ if ( size == 0) return; int t = a[size-1]; a[size - 1] = *a; *a = t; reverse(a, size/2); }[/CODE] However, the above coding did not …

Member Avatar for am5a03
0
227
Member Avatar for FotG2

I have this section of code that keeps giving a vector subscript out of range error, but I cant figure out why. the vector is defined as [CODE]vector< vector<double> > distance;[/code] for the test I am doing, point->size() = 3, and through the debugger I have verified that the matrix …

Member Avatar for daviddoria
0
215

The End.