49,761 Topics

Member Avatar for
Member Avatar for wan_1

this is the question given by my lecturer :- Write a program to accept 5 students (names) and their respective test marks into an array or arrays. Sort them and print the lists in: a) alphabetical order b) mark ranks(from highest to lowest) and my input is enter name : …

Member Avatar for taichichuan
0
146
Member Avatar for Builder_1

Write a function ListSplit that will split a circular list containing an even number of nodes, say 2k, into two circular lists each of which contains k nodes. The function should have three parameters and should work so that the function call ListSplit(list,sub1,sub2); will create new lists pointed to by …

Member Avatar for Builder_1
0
422
Member Avatar for maskinao

Hi! I'm trying to write a code for my arduino project. it's an SMS-based Led matrix display. I seem to have problems with SRAM memory because of the size of the code. can you help me optimize it? #include "cmap.h" #include <SIM900.h> #include <sms.h> #include <SoftwareSerial.h> #define INTEN 6500 //speed …

Member Avatar for jamescasundo
0
354
Member Avatar for meeno28_

May someone help me.. A kilogram is 1000 grams. Write a program that will read the weight of a package oof butter and output the weight in kilograms, as well as the number of package of butter needed to yield 1 kilogram of butter. Your program should allow the user …

Member Avatar for Slavi
0
141
Member Avatar for Bharath_4

Let x be a node in SLL. Write a C++ function to delete the data in this node. Following this deletion, the number of nodes in the list is one less than before the deletion. Your function must run for O(1).

Member Avatar for happygeek
0
263
Member Avatar for faultybits

The father of C++, Bjarne Stroustrup took part in a live Q&A via Google Hangout-On-Air. The Q & A was moderated by Patrick S, one of the moderators from the C++ Google+ Community, and Brad Y., of Pearson Ed/InformIT. The Q&A session was a public event. PS:This is not your …

Member Avatar for HiHe
0
210
Member Avatar for aluhnev

int Cabin (int n); int _tmain(int argc, _TCHAR* argv[]) { cout << Cabin(8) << endl; return 0; } int Cabin (int n) { if (n == 1) return 0; else return Cabin(n/2) + 1; } Hi ,can someone explain why is the answer 3 here:if to folow the formula the …

Member Avatar for aluhnev
0
260
Member Avatar for tgreiner

I have written some code that contains a system to report error messages to error log file. I use a class structure to do this. However, some parts of the code contain functions that I think might be useful in a more generic context. So, I am trying to use …

Member Avatar for tgreiner
0
169
Member Avatar for aluhnev

//Hi Lads.This is my first attempt to create template functions. //Here is the main ,which needed to create Locate.h file/header and //in that Locate.h create templates to support the main. //If the value does not exist in the array, -1 is returned. // Templates.cpp : Defines the entry point for …

Member Avatar for aluhnev
0
191
Member Avatar for ADHAMLOVER

The area of the circle is defined as A = Ï€ . R2, having Ï€ as 3.14159. Calculate the area using the formula given in the problem description. Input Read the variable R (double precision), that is the radius of the circle. Output Print the variable A, rounded to four …

Member Avatar for NathanOliver
0
79
Member Avatar for HuePig

Hi, I have a Blackboard object which is a singleton, what it does is store the message and the reciever. The challenge is that the blackboard will send an alert to the reciever and the reciever have to check the blackboard for the message. class Subscriber{ public: virtual ~Subscriber() {} …

Member Avatar for Banfa
0
349
Member Avatar for JayGarxP

I keep getting access violations even though I made sure to make all my methods and functions const! Driving me insane. When I add a player then try to display all players the program tries to read my privates then gets violated. (Still lots of bugs in it elsewhere, but …

Member Avatar for Banfa
0
282
Member Avatar for cambalinho

by several reasons, i must create the static with it's paint message: case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(inst->hwnd, &ps); if(inst->Paint==NULL) { RECT f; GetClientRect(hwnd,&f); HBRUSH s=CreateSolidBrush(inst->clrBackColor); SelectObject(hdc,(HBRUSH)s); if (inst->clrBackColor==-1) { //hide, copy the parent control and show the control again ShowWindow(inst->hwnd,SW_HIDE); BitBlt(hdc,0,0,f.right-f.left,f.bottom-f.top,GetDC(GetParent(inst->hwnd)),inst->intLeft,inst->intTop,SRCCOPY); ShowWindow(inst->hwnd,SW_SHOW); } else FillRect(hdc,&f,s); SetBkMode(hdc,TRANSPARENT); …

0
102
Member Avatar for Edwins_1

Suppose we have a polynomial f(x) = 4 – x3. We want to find the value of x that makes f(x) = 0. (This value, call it t, is the cube root of 4. In fact we can use the bisection method to find the nth root of a number.) …

Member Avatar for magdaekeya
1
219
Member Avatar for psmb

I need a C++ program to implement a heap based priority queue which accepts job ID, priority number and submitter name as inputs. the program should heap sort whenever a new job ID or priority or submitter name is entered. The jobs that have maximum priority should be extracted (along …

Member Avatar for mike_2000_17
0
190
Member Avatar for lewashby

In the following program, where is pt1 getting it's values (1, 0)? I get pt3's values (5, 10) because I can see them in the code. #include <iostream> using namespace std; class Point { private: int x, y; public: Point() {} Point(int new_x, int new_y) { set(new_x, new_y); } void …

Member Avatar for AndrisP
0
125
Member Avatar for ceelos1974

I need help combining the file name with the filepath my code: WIN32_FIND_DATA FindData; HANDLE hFind; hFind = FindFirstFile(L"../art/*.dds", &FindData ); if( hFind == INVALID_HANDLE_VALUE ) { PrintCharS("Error searching directory"); return; } do { char ch[260]; char DefChar = ' '; WideCharToMultiByte(CP_ACP, 0, FindData.cFileName, -1, ch, 260, &DefChar, NULL); string …

Member Avatar for vijayan121
0
316
Member Avatar for dannie.duxug.5
Member Avatar for nicole.c.quintana.3
0
80
Member Avatar for Gunjan_1

What is the difference between access modifier, modifier and qualifier? It's a competition exam question. and is a very important question from exam point of view. plz help me to get the answer of this question.

Member Avatar for mobashir20
0
119
Member Avatar for Maredi

Using strictly pointer data type, write a modular C++ program that makes use of a single function called convert() to sort two integer numbers passed to it as arguments, exchanging them if the first is smaller than the second (Descending order). Example: if the function is called in main() as …

Member Avatar for mobashir20
-1
141
Member Avatar for arif421

How many times is the inner loop body executed in the following nested loop? for (int x =1; x <= 10; x++) for (int y = 1; y <= 10; y++) for (int z = 1; z <= 10; z++) cout << x +y+z;

Member Avatar for Schol-R-LEA
-1
48
Member Avatar for rk1993

For instance, ABBA is a palindrome, but ABCBB is not. You are given a string s. Return the length of the longest substring of s that is a palindrome..program in c++

Member Avatar for gtcorwin
0
183
Member Avatar for andruluchko

Hello. I have a following verse: >A swarm of bees in May >Is worth a load hey; >A swarm of bees in June >Is worth a silver spoon; >A swarm of bees in July >Is hot a worth a fly. And I have to modify this text so that all …

Member Avatar for L7Sqr
0
179
Member Avatar for Daniel_30

I am a student in Computer Science, and am writing a small guide for my fellow students. It will contain a large list of the most commonly used and studied functions in C++ (e.g. Bubble Sort, linear search, file writing, etc.) and the code used to perform each function. I …

Member Avatar for Daniel_30
0
109
Member Avatar for Avladimir

The loan officer at the Belize National Bank wants you to write a C++ program that would help him decide whether to approve small loan application. The program should prompt the user for the customer’s yearly income, the number of years of the loan (loan period), the amount of the …

Member Avatar for vegaseat
0
153
Member Avatar for munchlaxxx

Say I have something similar to this: http://faculty.utpa.edu/chebotkoa/main/teaching/csci3336spring2013/slides/lexsyn/sample-lex-syn.html Does anyone know how I would be able to make "\n" or "\t" recognized as a token? I would probably need to add a case for it in the switch in LexicalAnalysis.cpp, right? And add it to the state diagram? But how …

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

Come up with a program that prompts the user to enter three movies and display the entered information using your understanding of data strucures. // Structures3.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> #include<string> #include<sstream> using namespace std; # define N_movies 3 struct movies_t{ …

Member Avatar for JasonHippy
0
115
Member Avatar for cambalinho

from reading these site: http://www.catch22.net/tuts/flicker-free-drawing i understand that i must avoid the pixel been changed more than once and a double-buffer: //how avoid the pixel be changed more than once: case WM_ERASEBKGND: return 1; //for other controls, we must use another messsage(see the child control messages) and heres how we …

0
178
Member Avatar for Sunil_12

Hello All, I am writing c++ program to insert, sort, display and merge two linked lists. Insertion, sorting and display functions are working fine but merge function is not working as expected. Please help me correcting merge function. I have used One header file "intSLLst.h" and two cpp file "intSLLst.cpp" …

Member Avatar for Lerner
0
685
Member Avatar for jarleking

hi there people i got a prob with my code in my problem i got a matrix and i need to find the even number or numbers on that matrix (12x30) (by the way is the even minimun or minimums), so here is my function "tempeven" part., the actual issue …

Member Avatar for jarleking
0
108

The End.