49,761 Topics

Member Avatar for
Member Avatar for bythescruff

Hi folks. I'm about to evaluate an implementation of SYCL for ease of use and performance when writing parallel programs for heterogeneous environments, and I'm looking for good candidate programs to port to SYCL which will exercise its C++ features. Can anyone suggest any good examples of open source libraries …

Member Avatar for mike_2000_17
0
251
Member Avatar for Shamar_1

Write a C++ program that accepts four quizzes (30%), two midterms (40%) and a final (30%) and displays the overall average. The maximum score for all quizzes and exams is 100 points.

Member Avatar for rubberman
-1
247
Member Avatar for Shamar_1

Write, compile, and execute a C++ program to calculate the sum of the numbers from 1 to 100. The formula for calculating this sum is sum = (n/2)(2*a + (n-1)d), where n = number of terms to be added, a = the first number, and d= the difference between each …

Member Avatar for David W
-2
169
Member Avatar for cambalinho

think in these way: the eyes have the blue color, the backcolor is blue. so how can i change the backcolor without change the image\eye? (these is just an exemple for trying explain)

Member Avatar for cambalinho
0
151
Member Avatar for cambalinho

heres my image class: class image { private: ULONG_PTR m_gdiplusToken; Gdiplus::GdiplusStartupInput gdiplusStartupInput; HDC hdcimage=CreateCompatibleDC(NULL); HGDIOBJ obj=NULL; HBITMAP btBitmap=NULL; Image *img; bool isimgused=false; int imageheight=0; int imageweight=0; int framecount=0; int intSelectFrame=0; int framedelay=0; string strfilename=""; Gdiplus::Color clrBackColor=Gdiplus::Color::Transparent; HDC hdcwindow; bool blnTransparent=true; HICON HICONFromHBITMAP(HBITMAP bitmap) { BITMAP bmp; GetObject(bitmap, sizeof(BITMAP), &bmp); HBITMAP …

Member Avatar for Schol-R-LEA
0
296
Member Avatar for iikitty

The first few digits are always "0"s and the last is "1"... I tried calculated on paper many times according to the steps in the code which I believe its logical and smooth. However it outputs "0"digits in front and "1" at last for every execution and I dun know …

Member Avatar for iikitty
0
311
Member Avatar for David_53

can anyone please explain different with vector::begin() and std::begin() ?? the code is based on the book, Effective Modern C++ item13. #include <iterator> #include <boost/type_index.hpp> using namespace boost::typeindex; #define PRINT_TYPENAME(__param) do { \ std::cout << "param (" << #__param << ") " \ << type_id_with_cvr<decltype(__param)>().pretty_name() \ << std::endl; \ } …

Member Avatar for vijayan121
0
349
Member Avatar for NoobCoder85

Here is my code: ` #include <iostream> #include <iomanip> #include <string> using namespace std; class Register { //Private members private: //Creating an array for all the Prices static double Price[]; //Declaring RegNUM and RecNUM int RegNUM, RecNUM; //Print out Item name in a loop static string items[]; //Creates a Receipt …

Member Avatar for David W
0
372
Member Avatar for Omar El Hussein

I've learned the basics of c++ Now, I want to develop and enter the graphics world, Any suggestions?

Member Avatar for マーズ maazu
0
181
Member Avatar for Yardood

Can someone please recommend me on a right way of working with codes? how should i plan it? how should i arrange it? every time i start a project i find myself later struggling with the difficulties of an unplanned project. how do YOU do it?

Member Avatar for Yardood
0
162
Member Avatar for JustinCpE

Good Day Sir, I am practicing on how to program something using do...while loop. I want to make a program that will ask for the Prelim, Midterm, Finals and Semestral Grade. 70% is the passing rate in our University. What are the codes that I have to put in C++?

Member Avatar for rubberman
-1
230
Member Avatar for marcelmarcelmarcelmarcelmarcelmarcelmarcelmarcel

Hello, for a school assignment I was supposed to write an insertion sort algorithm for a doubly linked list. As the feedback system of this particular course is rather weak (actually non-existent) I would like to ask you for your honest opinion about how well this is implemented, what could …

Member Avatar for David W
0
2K
Member Avatar for Yara Emad

Why it keeps giving me a zero answer ?!!! even though there IS a text file to search in it !! //a C++ project that reads a text from an input file and writes the same text into an output and find how much symbols are there #include <iostream> #include …

Member Avatar for David W
0
488
Member Avatar for Nanyo

Hi does anyone know if it is possible to use bruteforce to check for a username and a password in a website using C++? If yes please provide some code. Thanks! (Oh, and I am going to use that with educational purposes only) :D

Member Avatar for Nanyo
0
80
Member Avatar for Christina_3

Hi, I was assigned a project to write a user information program to help create and maintain user data. One of the parts of the project I am completely stumped on is how to validate the password a user would input... Tasks are... Evaluate Password - If either of the …

Member Avatar for Moschops
0
231
Member Avatar for bidisha_1

question related to C++ 1) Find the sum of natural numbers from 1 to 10. 2) Accept n numbers and find total of divisible by 5 and not by 10.

Member Avatar for rubberman
0
108
Member Avatar for SwtNemesis

Hello, I need to write a program that calculates how many days from year January 1, 0000 to any specified date including leap years. When I run the program that I have, I am off by a few days for any given date. Can someone please check out my code …

Member Avatar for David W
0
2K
Member Avatar for NoobCoder85

The tools Hal’s sells are: Hammers: $10.99 Wrenches: $10.99 Levels: $19.99 Tape Measures: $4.99 Screwdrivers: $8.99 In order to make things easier in the long run you have decided to make a c++ program that takes in all the orders for each register and tallies them at the end of …

Member Avatar for NoobCoder85
0
1K
Member Avatar for Piotr_13

I hope it's right place for it, if no - sorry, please tell me where I should place it. I wrote simple time class, could you review it, tell me what I did good, what wrong, and how I can fix it? I excluded things like include guards, namespaces, include …

Member Avatar for Piotr_13
0
215
Member Avatar for TObannion

So I was given a stack program to convert from int to char. I converted it but the output is...not expected. Wanting someone to point me in the right direction. I will post the header and driver program of the int stack and then the header and driver of the …

Member Avatar for NathanOliver
0
327
Member Avatar for mike_2000_17

This tutorial is the first time I write about coding techniques for improving the performance of software. This is going to be a step-by-step journey through a real example, with real benchmark results at every step so that you can see the effect of the different optimization techniques. And as …

Member Avatar for NathanOliver
7
2K
Member Avatar for Jazmine_1

Hey everyone so here's a new code and it compiles but it won't let me separate the data and add more questions for the user. Please help me and thanks in advance! I need it to enter 3 elements after list2 header file #ifndef H_myArray #define H_myArray class myArray { …

Member Avatar for David W
0
258
Member Avatar for senait.kifle.127

Hello Guys, I am trying to implement a coparison operator == into a try catch block to compare to clocks. I defined my comparator as friend bool operator ==(Clock&c1,Clock&c2) { return(c1.get_hour()==c2.get_hour() && c1.get_minute()==c2.get_minute()); } and my try catch block as Clock *clock3; try{ int hour,minute; cout<<"Hour: "; cin>>hour; cout<<"Minute: "; …

Member Avatar for mike_2000_17
0
232
Member Avatar for surya777

#include<iostream.h> void main() { int i=o; i=400*400/400; cout<<i; } i am getting a wrong output

Member Avatar for NathanOliver
0
137
Member Avatar for kellnerq

Hi together i need your help... again for my lab work. The question is the following: Use a single-subscripted array to solve the following problem. A company pays its salespeople on a commission basis. The salespeople receive £200 per week plus 9 percent of their gross sales for that week. …

Member Avatar for Victim_1
0
3K
Member Avatar for akane.mikazuki

#include<stdio.h> #include<conio.h> main () { clrscr(); int a=1,b,sum; while (a<=100) { sum=0; for (b=1; b<=a+9; b++) { sum=sum+b; printf("Sum is %d.\n", sum); } a=a+20; b=a; } getch(); return(0); } -This code is supposed to print the sum of the first 100 words. Getting the sum of the first ten, skipping …

Member Avatar for jaduong
0
106
Member Avatar for tentrabyte

Enter five scores and display the lowest score and the difference of each score from the highest score. I'm so confused. I don't know if i'll use array or looping. Need you help. Thanks

Member Avatar for David W
0
816
Member Avatar for toneranger

Hi, I'm new to APIs. Got the code below to compile (with 3 warnings C4129) but it won't output to the designated path. I created the txt file ahead of time, nqquotes.txt, but after the code compiles, that file stays empty. Thanks for your help, TR #include "stdafx.h" #include <tchar.h> …

Member Avatar for toneranger
0
170
Member Avatar for pdk123

I have a approximate following class class ClassA : public ClassB { void HandleMessages(const u8 *pP, const u16 nMsgBodyLen); static std::map<std::pair<u32, u32>, CreateSessInfo> m_mSessionId2CCRNum2DefaultBearerId; }; When trying to access the map from the HandleMessage, I am getting the linker error, saying the undefined reference to m_mSessionId2CCRNum2DefaultBearerId; Could some c++ experts …

Member Avatar for NathanOliver
0
307
Member Avatar for saxon84

Hi, I'm new to c++ but I'm having a go trying to create a jagged array int** DATA = new int*[10]; DATA[0] = new int[100]; //this works DATA[1] = new int[100][5]; //but this don't DATA[1][100][1] = 1; Thanks

Member Avatar for deceptikon
0
3K

The End.