49,766 Topics

Member Avatar for
Member Avatar for Bendez Thyna

i have this for my requirement assignment: Write a search function int get_index(const float astm[?][?], const int size) to find the array index from a given size. can someone give me some hint on how to di it pleass?

Member Avatar for Bendez Thyna
0
217
Member Avatar for nathan.pavlovsky

Hello programmers! I was working on a program that reads a sequential file with bank accounts. The file has three sets of data per line: the account #, the account holder's name, and balance. Then, I made a program to print the file- and it printed the last line of …

Member Avatar for vmanes
0
366
Member Avatar for ala_2

I am having trouble reading uint ARRAYS properties from WMI objects. I can read and process STRING properties from WMI objects.

Member Avatar for BobS0327
0
514
Member Avatar for Suzie999

Simplified code snippet produces assertion string out of bounds error if I do not uncomment the if statement in main. using namespace std; size_t find_next_of(string & src, size_t pos) { //size_t tmppos; //if (pos != string::npos) { return src.find_first_of('a', pos); //} //return string::npos; } int main( void ) { string …

Member Avatar for Suzie999
0
231
Member Avatar for hahahanz

Hello Im quite Confused right now. I am trying to insert a Node in between nodes and it is not being displayed. Please Help. #include <iostream> #include <conio.h> #include <cctype> using namespace std; struct Node { int DATA; Node * Next; }; Node * head = NULL; void Display(); void …

Member Avatar for hahahanz
0
248
Member Avatar for dovlet.eminov
Member Avatar for yazan.a.ali.5

1) write a C++ program that reads 50 integer numbers and prints the smallest three numbers.

Member Avatar for Schol-R-LEA
0
117
Member Avatar for Praveen_10

#include <iostream> #include <cstdlib> using namespace std; // function prototype for add int add (int x, int y); int sub (int q, int r); int mul (int s, int t); int divi (int u, int v); int main () { int a,b; char ch; loop:cout<<"ENTER CHOICE OF OPERATION: + - …

Member Avatar for Praveen_10
0
273
Member Avatar for thanh.truong.1272

I was asked to create a program to find word frequencies, word length in a text file. I am able to use map to do the frequencies part but don't know how to sort the the output accordingly to the length of the words. The example output that I should …

Member Avatar for uonsin
0
565
Member Avatar for jhender4880

I have to take a 5 element array and use a function with pointers to make a new array that is one element bigger and shifted 1 place. I have it working so that it shifts one place but the function isn't making the array one element bigger. Any sugestions? …

Member Avatar for jhender4880
0
221
Member Avatar for Siberian

Hi, I didn't know where to place this thread :) Any recommendations for an IDE app to save snippets of code within the program, I looked online, and there are many options, too hard to pick ! :)

Member Avatar for Siberian
0
326
Member Avatar for pooja_4

hey can any one try out this problem.... 1)Write a program to read a sequence of N integers and print the number that appears the maximum number of times in the sequence. INPUT Input contains two lines. First line in the input indicates N, the number of integers in the …

Member Avatar for Faizal Shariff
1
295
Member Avatar for memo_1

Write a C++ program to perform the following: 1) Input a positive integer total that represents the total distance in meters a person needs to travel. 2) Input a positive integer first that represents the distance of the first jump. This distance should be less than or equal to total/20. …

Member Avatar for Schol-R-LEA
0
99
Member Avatar for admiri92
Member Avatar for rajii93
0
532
Member Avatar for jeevan reddy

I have a server and a client. I wrote handlers for send button and receive. When I send a string I am receiving only first two chars and then some japanese chars of the string on the receive side. I wanna receive the entire string.Please help me . This is …

Member Avatar for jeevan reddy
0
193
Member Avatar for shubham.goel.41995

I want to make a project on online examination which have some similar view like amcat and also have a view which run programs online.

Member Avatar for invadev
0
284
Member Avatar for fatmah

hi , i have a very simple Family tree project using GUI..... and i have two forms ! the first form ask the user to enter the number of child the parent have then in the 2nd form there will be a box as the number of child like when …

Member Avatar for ravi_14
0
117
Member Avatar for ckide
Member Avatar for Dang_1

hi everyone, i need some help. This is my problem. When I input a string to the program, I want the screen console print out '*'. ex: string s; cout<<"password :"; getline(cin,s); when i type "abc123" for the password. The screen console will show "******". I'm sorry about my poor …

Member Avatar for Ancient Dragon
0
495
Member Avatar for ravi_14

i was reading a book and came across this line "C++ matches a pointer of any other type with type void * and prints a numeric representation of the address. If you want the address of the string, you have to type cast it to another type," please any one …

Member Avatar for Ancient Dragon
0
188
Member Avatar for shadowplayer28

when converting iget erros especially in the cin parts because they are automatically passed by something #include<iostream> #include<conio.h> #include<math.h> using namespace std; int p=1; class Bank { public: char name[50],address[90],type; double ein_betrag, aus_betrag; double balance; int costumernr, accountnr, birth, tel; public: void newcostumer(); void newaccount(); void costumerdel(); void accountdel(); void …

Member Avatar for Schol-R-LEA
0
324
Member Avatar for trantran

I am writing a class that uses different policies stored in classes I want to declare this class by simply selecting the policies by writing `my_great_class<policy45, policy22, policy12>` (There can be a varying number of policies) which would translate automatically into: struct empty_class{}; struct policy12: empty_class{ // code... }; struct …

Member Avatar for trantran
0
626
Member Avatar for s11109753

A.3 Car rental 3 This program is for a car rental agency. Your program will have to compute the total cost of a rental. This agency has two types of cars, and the rates per day are as follows: All cars come with a basic insurance that covers damage to …

Member Avatar for vmanes
0
130
Member Avatar for smitsky

I'm having trouble displying the contents of a queue. When I pop the queue here: for( int i = 0; i < diskQueue.size() + 1; i++ ) { cout << left << setw(0) << "--d" << i+1 << left << setw(4) << " " << left << setw(14) << diskQueue.front().getFilename() …

Member Avatar for smitsky
0
220
Member Avatar for ivan3510

Hi! This is just an example code: #include<iostream> using namespace std; int& example() { int a=5; return &a; } int main() { cout << example(); } But I'm getting this error: Error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int\*'

Member Avatar for ivan3510
0
205
Member Avatar for ashley.vanhoesen.7

I am writing a program to input data from a file, format it and then output to another file. For some reason when i make the file I get this error: ----jGRASP exec: make g++ -ggdb -c Billionaire.cpp iostream:39:0, from Billionaire.cpp:7: c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream: In constructor 'Billionaire::Billionaire()': ostream:384:7: error: 'std::basic_ostream<_CharT, _Traits>::basic_ostream() [with …

Member Avatar for ashley.vanhoesen.7
0
4K
Member Avatar for smitsky

Hi. Can someone explain why this isn't working? #include <iostream> #include <list> #include <string> #include <iomanip> using namespace std; /** * Global Variables */ int printer; int disk; int cd; int num; int pmem, plen; int dmem, dlen; int cmem, clen; class PCB { public: PCB() : pid( 0 ), …

Member Avatar for smitsky
0
140
Member Avatar for smitsky

Hi. I'm trying to access some data in a List using an Iterator, but I'm getting an error message: #include <iostream> #include <list> #include <string> #include <iomanip> using namespace std; /** * Global Variables */ int printer; int disk; int cd; int num; string k; int pmem, plen; int dmem, …

Member Avatar for smitsky
0
219
Member Avatar for gu mi nam

this code was error.please help me fix it include <iostream> include <conio.h> include <algorithm> using namespace std; int a[]={1,5,7,4,9,8}; BST*binary_search_tree; struct BST{ int value; BST* left; BST* right; }; int search_bst(BST* node,int key){ if(node==NULL) return -1; if(key<node->value) return search_bst(node->left,key); if(key>node->value) return search_bst(node->right,key); else return node->value; } void insert_bst(BST* &treeNode,BST* newNode){ …

Member Avatar for gu mi nam
0
399
Member Avatar for smitsky

Hi. Can someone tell me why the following code is giving me an error message? Thank you. #include <iostream> #include <list> #include <string> #include <iomanip> using namespace std; /** * Global Variables */ int printer; int disk; int cd; int num; string k; int pmem, plen; int dmem, dlen; int …

Member Avatar for smitsky
0
420

The End.