49,761 Topics
| |
using 'strcpy_s' error c2660 void sortData(int size, char studentName[][6]) { bool swap; int temp[6]; do { swap = false; for (int count = 0; count < (size - 1); count++) { if (strcmp(studentName[count], studentName[count + 1]) > 0) { strcpy_s(temp, studentName[count]); strcpy_s(studentName[count], studentName[count + 1]); strcpy_s(studentName[count + 1], temp); swap … | |
Hi fellas I'm reading "Teach yourself C++" book by Herbert Schildt to learn C++. there is an example in chapter 10 which is tough to me. this is the code I'm talking about: #include <iostream> #include <cstdlib> #include <cctype> using namespace std; class list { public: list *head; // pointer … | |
Hi All , In below code i am getting error while assigning one object with other and result is clear as both objects are different types. it is expected that RHS object should belong to same class. How to resolve this issue. error: no match for operator= in obj1 = … | |
so the program needs to dynamically allocate an array large enough to hold a user=defined number of test scores. once all scores are entered, the array should be passed to a function that sorts them in ascending order. another function should be called that calculates the average score. the program … | |
I want from program that it force the user to input valid value.When ever user enter caharcter in integer valriable it force the user to input the right value.But this does not work.If user input invalid value it start looping. #include <iostream> using namespace std; int main() { int x; … | |
Why This Program is not Changing Directory from C:/ to H: Drive or D: Drive. #include<iostream> using namespace std; int main(int a,char *b[]) { int option; cout<<endl<<"Enter 2 for 2nd Semster Programs "<<endl; cout<<endl<<"Enter 3 for 3rd Semster Programs "<<endl; cin>>option; if(option==2) { system("D:"); system("explorer ."); } else if(option==3) { … | |
Guys i cant imagine about how i'm gonna calculate that one... help me out please | |
#include <iostream> using namespace std; //Linked List: Delete a node at nth position struct Node { int data; Node* next; }; Node* head; //Global void Insert(int data) { //Insert an integer at the end of list Node* temp1 = new Node; temp1->data = data; temp1->next = head; head = temp1; … | |
Hello, I’ve got an assignment from my math teacher to do with c++, because I am studying IT. The problem is that we didn’t even learn c++, I know only what I thought myself, so I need someone’s help. The task is to make a simple program that would be … | |
hi guys could anyone help me with binary tree tying to write functions to check if a binary tree is complete or full or none this is all i did help please #include <iostream> using namespace std; struct bTree { int info; bTree *left; bTree *right; }; bTree *root=NULL, *leaf; … | |
class CIMSSubscription : public CBaseRecClass { public: CIMSSubscription() : CBaseRecClass(ClassRecSubsIMS) {} CIMSSubscription(const string & sIMSI, const string & sPubId); ~CIMSSubscription() { m_mPrivateId2SubsIMS.erase(m_sPrivateId); } struct PublicIdInfo { hssCx::ns1__tServiceProfile * pServiceProfile; // 23.228 5.2.1a Public user Ids belong to registration set // *may* point to different or the same service profiles string … | |
Create a simple login and signup form in which the user should choose if he wants to login or signup at the beginning. Signup: In which a user enters user name, id and date of birth in a binary file and checks if the id already exists it gives an … | |
Well we all have seen the common questions on creating squares and hollow squares out of asterisks in C++, but how about creating a program that prints out a circle in asterisks? Obviously this would look like an oval due to line adjustment, but it would be quite interesting to … | |
I'm having trouble solving this porblem. Write only the “snippet” of C++ code for a function definition, fillArray, which fills int_array. Repeatedly prompt the user to enter an integer at the keyboard. (Input values should be stored in row order). fillArray has one argument, the 2D array. 'Protect' arrray values … | |
I'm having trouble implementing this function definition, any help will be appreciated. Write only the “snippet” of C++ code for a function definition, printColumn, which prints to the console the values in a column specified by the user in the function call. printColumn has two arguments, the 2D array and … | |
Hey I'm new to c++ and using Eclipse as IDE on ubuntu. My question, How to insert a BEEP sound in mentioned IDE and OS. | |
I have a c# service running.I need to call few c# methods from my c++ code. what is the best and effiecient way to achieve this . Any sample for the same would be help a great deal. | |
a) Perform a DRY RUN on the algorithm below using the data provided. Lay out the results of the dry run in TABLE FORMAT with a column for each variable. Input A C = 0 D = A Repeat Input B If B > D D = B endif C … | |
Hi all, I need program that has the following: a) Create a structure that represents the product in the inventory. b) Insert 5 different product details into the inventory. c) Display the name of the most expensive product and the main information is: Product ID: 5 characters Product Name: 50 … | |
i did a class for the timer precision using the timeSetEvent(). of course i can have more than 7 instances from the Timer class(with 200ms or something so small). is these a limitation or what? class Timer { private: static unsigned int TimerCount; UINT_PTR timerid; UINT m_uResolution=0; unsigned int TimerID=0; … | |
[B]PLEASE NEED HELP WITH THIS HOMEWORK.... THANKS[/B] THE FOLLOWING CODE PERFORMS A [B]SNAKE GAM[/B]E USING GRAPHICS.H LIBRARY IN [B]TURBO C++ COMPILER[/B]... PLEASE ADD TWO MORE FEATURES... USING AN "+" CHARACTER TO INCREASE VELOCITY OR REDUCE DELAY AND ALSO AN OPTION TO RECORD HIGHER SCORES. PICTURE: [ATTACH]15179[/ATTACH] THE FOLLOWING CODES NEED … | |
Write a program that can be used by a small theater to sell tickets for performances. The theater’s auditorium has 15 rows of seats, with 30 seats in each row. The program should display a screen that shows which seats are available and which are taken. For example, the following … | |
Hello, I've been working at this code from a couple angles, I've had two people I've known to help me, but even with their help it hasn't worked. The question I have relates to CodeLab: Write the definition of a function named printStarBucks that receives a non-negative integer n and … | |
When I enter 2 values the third one is garbage..Don't Know why.. #include<iostream> #include "Size_Decider.h" using namespace std; int main() { int size=0,Encoded_Matrix_Column=1; cout<<"Enter The Number of Digits "; cin>>size; int *Digits= NULL; Digits = new int[size]; Encoded_Matrix_Column = matrix_size_checker(size,Encoded_Matrix_Column); cout<<"It Has "<<Encoded_Matrix_Column<<" Columns"<<endl; cout<<"It Hass 3 Rows"<<endl; //Intilizing every … | |
i have an assigment to solve a mathemathical problem of rolling ball its height decrease by 1/4 of its original height. please give me an example. thank you | |
Hi there. I am new to cpp and self-taught. I tried playing with switch case and functions. But the output of this simple temp conversion program does not work as expected. I get wierd numbers in output. I even tried initializing the variables, still no use. I have indicated in … | |
Create a program that will input 5 strings/words. Arrange them in alphabetical order. | |
Write a program to find the integer square root of a given number.That is the largest integer whose square is less than or equal to the given number. | |
Hi. I am new to the forum and I had a question. I have looked around and haven't really been able to find exactly what I am looking for. I am looking for the code in C++ to read in a random single line with spaces from a file. This … |
The End.