49,761 Topics

Member Avatar for
Member Avatar for tgreiner

OK, I've seen this error explained at least 100 times on the net. But in every case, it seems to be an error of #including <string.h> instead of <string> or metioning string instead of std::string. But, I've done all those things. And it still does not work. By way of …

Member Avatar for Schol-R-LEA
0
9K
Member Avatar for tentrabyte

#include<iostream> #include<cstdlib> using namespace std; int main() { srand(21); cout << "Unique numbers:"; for (int x = 1; x < 10; x++){ cout << 1 + ( rand () % 20) <<endl; } system("pause>0"); return 0; } Guys this is my program. Can i ask if how can i vertical …

Member Avatar for mridul.ahuja
0
197
Member Avatar for akane.mikazuki

I need help to display on the screen rock when user picks rock, paper when user picks paper, and scissors when user picks scissors. Thanks

Member Avatar for Schol-R-LEA
0
485
Member Avatar for andrew mendonca

C++ Programming Exercise: Implement a command-line calculator that allows the user to enter an expression containing numbers, variables, brackets, and operators. The calculator will also allow assignments to a variable. After the user enters the expression the program will evaluate it and display the value. If the expression is part …

0
138
Member Avatar for AQ

hey guys i was solving a question but there is something which is not working properly.. I'll provide you guys with question statement and my code below.The problem is occuring after the loop like if the avg is more then 0 still it shows the output massege as "terminating". Can …

Member Avatar for AQ
0
133
Member Avatar for ChrisP-C++

im looking to brush up on my C++ coding as its been a quite a few months since ive done anything with it and ive run into a snag with my coding and have spent hours with 2 Compilers (Bloodshed Dev C++ (where code was originally written)as well as Eclipse …

Member Avatar for mike_2000_17
0
365
Member Avatar for James_44

Please help. I really think I'm close to getting this. No I'm just banging my head against a wall. I have to replace a nested if statement with a switch statement. The loop should continue until Z or z is entered. I can't figure out what I'm doing wrong. #include …

Member Avatar for Moschops
0
131
Member Avatar for TheFearful

Hey guys, I just learned the very basics of arrays and I have to write this program of a tic-tac-toe game. The requirements are this: Write a modular program that allows two players to play a game of tic-tac-toe. Use a two-dimensional char array with 3 rows and 3 columns …

Member Avatar for マーズ maazu
0
3K
Member Avatar for Xsmael

I am developing Client-Server application in C++ using Qt framework, but the clients can be android phones and computers(Qt client app) Now i'm having troubles to handle Reception of data on the server side; the server is not receiving data properly. First, I got things working nicely between the server(Qt …

0
366
Member Avatar for cambalinho

i have notice that using the joyGetPosEx() function, when the joystick isn't connected, that the memory, that the application uses, is increasing. so is there another way just for see if 1 joystick is connected to pc?

Member Avatar for cambalinho
0
577
Member Avatar for tentrabyte

How can i create a rounding off program using ceil, floor, srand and rand... thanksss

Member Avatar for deceptikon
0
85
Member Avatar for klewis32

The following code creates a Sorting Array using Pointers and functions correctly. The issue I have is I want the array to sort, but put the zeros at the end. Any help would appreciated. #include <iostream> using namespace std; #include <iomanip> using std::setw; void selectionSort( int * const, const int …

Member Avatar for David W
0
14K
Member Avatar for makungu

SCENARIO You must type in a list of numbers and make sure that in the list, there are no identical numbers; in other words, no number must appear twice in the list. When entering a new number, make sure that the number does not exist in the list yet. If …

Member Avatar for deceptikon
0
91
Member Avatar for ghalib951

What is the output of program segment: vecList: push_back(3); vecList: push_back(5); vecList: push_back(7); vceIt = vceList.begin( ); ++vecIt; vecList.erase(vecIt); vecList.push_back(9); copy(vecList.begin( ), vecList( ).end( ), screen); cout << end1;

Member Avatar for NathanOliver
0
189
Member Avatar for can-mohan

Hi Guys, In below code you can see that i am able to execute the functionality of class a , inside the class b through composition and object of b can be used to call the methods declared inside the a class. #include <iostream> using namespace std; class a { …

Member Avatar for can-mohan
0
435
Member Avatar for exoruel

All of us started from being a rookie, and I'm one of those rookies who are new in this course. Maybe its time for you to share your expertise unto the newbies? Hope anyone might help me willingly in my program.Here's the problem: Use Pointers and Functions: Ask a user …

Member Avatar for David W
0
263
Member Avatar for DS9596

How do I write a recursive function to compute (3^2)+(3^3)+(3^4).......+(3^n) ?

Member Avatar for David W
0
400
Member Avatar for can-mohan

Hi guys, I would like to discuss my design with one query. below is the code snippet. It is clear from below code snippet that class pd is privately derived from AbstractClass as both are different classes and there is no relation between them.Now in my class pd i need …

Member Avatar for can-mohan
0
420
Member Avatar for daniel1977

Greetings: I have been struggling to clear this error I have in my code, but I cannot for the life of me find it. Error: End of File detected before Left Brace Attached is my code, appreciate any help. #include <stdio.h> #define SIZE 20 int i, j; int temp[SIZE], pressure[SIZE]; …

Member Avatar for NathanOliver
0
205
Member Avatar for Brown_2
Member Avatar for DS9596

How do I write a program to compute run-time of a recursive and non-recursive functions to find the 43rd Fibonacci number?

Member Avatar for Schol-R-LEA
0
285
Member Avatar for Tycellent

Hey everyone, Got 2 questions here that i'm hoping will be answered. Say i have 2 variables int iValue; int iValueArray[300]; and later on init. them in the constructor Banana::Banana(): ival(0), ivalArray() {} 1. What would the ivalArray() indicate? Would it be the same as initializing every element to null/empty? …

Member Avatar for Tycellent
0
327
Member Avatar for DS9596

I'm not sure if I'm doing this part correctly, the part where I have to make it all lower case then to all upper case, then just first name. #include <iostream> #include <cstring> #include <stdio.h> using namespace std; int main() { char a[3][14] = { "Barack ", "H", " Obama" …

Member Avatar for DS9596
0
1K
Member Avatar for Jazmine_1

Hey everyone! So I need to write two header files and they attach to the main cpp file, but we can not change the cpp file. They have to attach and make the program run. Please help! Main cpp CANNOT be changed! //22 34 56 4 19 2 89 90 …

Member Avatar for Schol-R-LEA
0
245
Member Avatar for Mubashir_1
Member Avatar for ghalib951

`Inline Code Example Here What is the output of the following code: int x; int*p; int*q; p = new int [10] ; q = p; *p = 4; for (int j = 0; j<10; j++) { x = *p; p++; *p = x + j; } for (int k = …

Member Avatar for NathanOliver
-1
132
Member Avatar for nitin1

Why can we virtual destructors but can't have virtual constructors? I have searched like anything. I got confused a lot after reading few articles on web. Please explain with some good example. Thanks in advance.

Member Avatar for serpi90
0
139
Member Avatar for Kenneth_3

I have just finished a merge and sort code for two seperate files. My two inputs are: File 1 Adams C Benton A Jones D Haley A King B Margaret F File 2 Barnes A Charles B Johnson C William D and it keeps doing this for my out put …

Member Avatar for Kenneth_3
0
377
Member Avatar for Reg74

I'm having some trouble attempting to implement the constructors for each class. I have this constructor for the class Transaction. Is this correct ? Transaction::Transaction(QString type, QDateTime datetime) : m_Type(type), m_DateTime(datetime) { } AND how do i implement the constructor for the class Deposit ? Is this correct ? I'm …

Member Avatar for David W
0
229
Member Avatar for shizu

Hi all.. I saw a part of codes which I unable to understand.. pleaase all the expert teach me ya.. below is the part of codes.. UINT A; USHORT B; USHORT *C; CString D; if(!sscanf_s(D, "0x%x", &A)) sscanf_s(D, "%d", &A); *(C + B) = A; //<= what is the meaning..?? …

Member Avatar for NathanOliver
0
157

The End.