49,761 Topics

Member Avatar for
Member Avatar for crazyninja247

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 …

Member Avatar for AssertNull
-1
76
Member Avatar for steve.dannay

Hello Please tell me how can I used CLS in C++.. In any programm. ?

Member Avatar for underjack
0
147
Member Avatar for rob2

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 …

Member Avatar for Gribouillis
0
233
Member Avatar for can-mohan

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 = …

Member Avatar for can-mohan
0
311
Member Avatar for Kenny_1

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 …

Member Avatar for Kenny_1
0
1K
Member Avatar for mabdullah4

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; …

Member Avatar for AssertNull
0
3K
Member Avatar for mabdullah4

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) { …

Member Avatar for AssertNull
0
359
Member Avatar for Quezia
Member Avatar for n00b321

#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; …

Member Avatar for n00b321
0
9K
Member Avatar for kognar65

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 …

Member Avatar for rproffitt
0
289
Member Avatar for aliaune

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; …

0
119
Member Avatar for Priya_11

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 …

0
121
Member Avatar for sarahmohamed97

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 …

Member Avatar for rproffitt
0
133
Member Avatar for restrictment

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 …

Member Avatar for CharlieCap
2
2K
Member Avatar for poloblue64

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 …

Member Avatar for David W
0
555
Member Avatar for poloblue64

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 …

Member Avatar for David W
0
321
Member Avatar for Ahmad_15

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.

Member Avatar for Ahmad_15
0
446
Member Avatar for screenedcreamy

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.

Member Avatar for rubberman
0
307
Member Avatar for Ivzirnalsradeys

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 …

Member Avatar for aanyadsouza
0
1K
Member Avatar for AKRAM83

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 …

Member Avatar for mabdullah4
0
237
Member Avatar for cambalinho

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; …

0
278
Member Avatar for andyherebi

[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 …

Member Avatar for tinstaafl
0
28K
Member Avatar for hq1

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 …

Member Avatar for happygeek
0
9K
Member Avatar for theoryforlife

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 …

Member Avatar for Lukas_1
0
2K
Member Avatar for mabdullah4

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 …

Member Avatar for AssertNull
0
207
Member Avatar for akdser6

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

Member Avatar for mabdullah4
0
119
Member Avatar for selfTaughtCPP

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 …

Member Avatar for tinstaafl
0
177
Member Avatar for pauline.zorilla

Create a program that will input 5 strings/words. Arrange them in alphabetical order.

Member Avatar for AssertNull
-2
132
Member Avatar for Muhammad Arslan_1

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.

Member Avatar for mabdullah4
0
195
Member Avatar for kylcrow

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 …

Member Avatar for zia shaikh
0
5K

The End.