473,908 Members | 4,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
1
1,132
thread by: young1 | last post Oct 12 '19 by: dev7060
I am trying to write and read entered text into a text file. I have managed to write into the text file but reading from it is proving a challenge. I can provide a snippet of code. and stud is an object of a class students. I'm using c++. { string str; int n, count = 0; cout<<"Enter number of courses: ";...
1
1,109
thread by: Maarir | last post Oct 12 '19 by: dev7060
i have a function like "int A(char x)" i want split the function and export into excel sheet as given below 1st column: filename 2nd column: int A(char x) 3rd column: int 4th column: A 5th column: char 6th column: char
2
1,660
thread by: shelly415 | last post Oct 12 '19 by: dev7060
how do i go back to "Please enter a number from 0 to 100" after i guessed correctly? this should be my output: Please enter a number from 0 to 100: 50 You guessed correctly in 1 try!Congratulations! Play again? Y //Yes Please enter a number from 0 to 100:
1
1,117
thread by: Tobi | last post Oct 12 '19 by: dev7060
Hey, i'm Tobi :o Sorry for my Bad English T_T... I have something like my own Engine for Games and Programs, im using WinApi ofc. and my question is about Mouse Buttons Left Right and Middle ( Wheel ) buttons every one know where they are X1 and X2 are on left side of Mouse but there is more button that Windows CallBack can handle... I...
1
1,009
thread by: young1 | last post Oct 12 '19 by: dev7060
I'm using c++(language) i need to display number of students doing each course, seemingly it displays the first number well but the second time i try it adds all the students doing all courses. here's the code below: { string str; int n, count = 0; cout<<"Enter number of courses: "; cin>>n;
1
1,102
thread by: Chris Sim | last post Sep 27 '19 by: gits
How to do this? Write a program that used to manage the HR data of a Faculty that has a team of 10 employees. The employee data like ( eno , ename , job ,salary , bonus). The program should have: Function to accept the data of employees and automatically set the salary according to the following formulas in case the Job = ‘senior...
0
1,108
thread by: bobbykurvar | last post Sep 17 '19 by: bobbykurvar
str fp,! add fp, sp, #0 sub sp, sp, #12 str r0, str r1 L5: ldr r3, ldrb r3, cmp r3, #0
2
1,716
thread by: loide25 | last post Sep 17 '19 by: gits
how to write a harmonic series to compute the sum of a harmonic series 1+1/2+1/3+1/4+1/n,where n=1000.The program shall prompt the user for the value of n.Keep the sum in a double variable and take note that 1/2 gives 0 but 1.0/2 gives o.5.
1
1,230
thread by: loide25 | last post Sep 17 '19 by: dev7060
Write a C++ program that will calculate and print the sum, mean, variance, and standard deviation of 7 numbers. The numbers must be input as data. This input data must be printed by the program. If your seven numbers input has been named A, B, C, D, E, F, G, then the variance may be computed as variance=(A-mean)^2+(B-mean)^2+(G-mean)^2}/6 and the...
1
1,215
thread by: khatiwalaforam | last post Sep 14 '19 by: dev7060
#define NUMBEROFDICE 5 #include <stdio.h> #include <stdlib.h> void RollDice(int dice) { int i; for(i=0;i<NUMBEROFDICE;i++) {
1
1,323
thread by: riyalittle12 | last post Sep 4 '19 by: dev7060
for (i+0;i<max_length;i++) if (input_line=='?') quest_count++;
1
1,024
thread by: riyalittle12 | last post Sep 4 '19 by: dev7060
write a c++ function that takes in one integer parameter and retrun 0 if the number is a palindrome and 1 otherwise .the parameter mssed be passed by reference
3
1,214
thread by: Conqueror99 | last post Aug 29 '19 by: dev7060
You are given a sequence of lower case alphabetical characters as input, say A, ..., A. N will be at most 100. A prefix of the sequence is some initial segment of the string - that is, A, ..., A, for some integer K, 1 <= K <= N. You have to output the longest prefix which occurs multiple times in the string. If no prefix occurs again,...
1
1,474
thread by: prasha | last post Aug 24 '19 by: dev7060
Could you please help me in getting rid of the Parse Error, I think it is something to do with the Preprocessor command. Could you please let me know the command. ---Preprocess Failed--- In file included from D:/10_VECTORCAST_ENV/BI3_IBU/Application/app_code/smk/a_app_function/warning\ac_plug_connected_warning.c:21:0,
1
1,316
thread by: soni1225 | last post Aug 9 '19 by: dev7060
how to remove constant expression requried?
1
1,256
thread by: NarutoUzumaki | last post Aug 6 '19 by: dev7060
Can someone please explain me what does (struct sockaddr*)&serveraddr means in the CONNECT system call. Reading this kind of syntax for the first time. Thanks.
1
1,304
thread by: ZS369 | last post Aug 2 '19 by: dev7060
how do i import a .csv file and save it to a memory buffer of doubles and print the contents of the .cvs file
1
1,152
thread by: mnopstuv5000 | last post Jul 30 '19 by: dev7060
Well I like to learn how to make tables perfectly ! And I wanna use the C language while learning . I know with colors white combines with every single item or color . And I used the C language to learn that. What about for every single item of anything ? i learned it by using " colors = 10,000000, ten million colors " r=0,255, red / g=0,255,...
3
5,231
thread by: AndreyKiber | last post Jul 22 '19 by: Mintind
It seems to me that there is an error in type n, but whatever type I put it still appears, just change to int n, float n, double n, but it still does not work. #include <iostream> #include <cmath> #include<math.h> #include<time.h> using namespace std; void func(float n) {
1
1,279
thread by: Stalker hacker | last post Jul 14 '19 by: dev7060
#include "stdafx.h" #include <iostream> #include <string> using std::wcin; using std::wcout; using std::wstring; int main() {
1
1,331
thread by: ZS369 | last post Jul 13 '19 by: dev7060
Hi, I’m creating a game where the user challenges the computer in a dice game. I was wondering what the algorithm is for coding a game where the user plays against the computer? Each player, the user and computer get to throw two dices each round. The person with the highest dice score wins the round. The person that wins the most out of 3 rounds...
2
4,981
thread by: vikash87 | last post Jul 12 '19 by: anant111
hey i am new in gdb debugging field. can anyone tell me the meaning <repeats 21 times>, in the following. (gdb) print *(pthread_attr_t *)pt_attr $5 = { __size = "\000\000\000\000\000\000\000\000\001\000\000\000\000\020", '\000' <repeats 21 times>, __align = 0 }
1
1,031
thread by: geetacplusprob | last post Jul 10 '19 by: dev7060
class Time { public: int hh, mIn, ss; Time() { hh = mIn = SS = 0; } } ; (a) Implement a class named "Event" that satisfies all of following requirements: i) The class has the following data members - id: An integer - name: A string that represents the name of the event - start, end: The starting and ending times ofthe event. We assume all...
3
1,609
thread by: maddy1010 | last post Jul 9 '19 by: chrimpylimes
Guys I'm having hard time with this function, please help me amount = (principal * (pow ((1 + interestRate / timesCompound),timesCompound)));
5
1,134
thread by: CP70 | last post Jul 9 '19 by: chrimpylimes
Hello, sorry but my English is not so very wel. i am trying to right a code to convert a letter but i can do it works en y dont found the problem. i hope you can help me en give explanation please. Tks here my code: /* leeskl.c */ /* stuurt als resultaat een teken terug */ /* en zet hoodletters om in kleine letters */

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.