49,757 Topics

Member Avatar for
Member Avatar for jorge.carmonajr

I am having trouble wrapping my head around classes. I'm not to sure what they are used for or how to use them. so i need some serious help with this assignment for my class. This is the assignment: **Create a class called Coordinate for performing arithmetic with x/y/z coordinates …

Member Avatar for Astreios
0
119
Member Avatar for unsensible

ok so as a homework assignment I have to sort a c-string array alphabetically. We have to use pointers and cannot using strings (although strcopy and strcmp can be used). I can sort integers and strings but for the life of me cannot figure this out. I'm pretty sure i'm …

Member Avatar for unsensible
0
2K
Member Avatar for mackieben04

**Hello Everyone! Please Help me on my C++ Program it's kinda buggy and full of errors. I hope someone can help me~ Thanks in Advance! :D** #include <iostream> using namespace std; int main() { int stun; float NUO, APU, IA, DP, Bal; cout<<"Student Record\n\n"; cout << "Student Number: "; cin …

Member Avatar for Ancient Dragon
0
90
Member Avatar for DaMaskMan2

. What wrong with the following code segment? int* = needle; needle = new int; *needle 100; cout << *needle; needle = new int; *needle = 32; cout << *needle;

Member Avatar for phfilly
0
67
Member Avatar for DaMaskMan2

What wrong with the following code segment? int* birdDog; int* germanShortHair; birdDog = new int; germanShortHair = birdDog; *birdDog = 42; cout << *birdDog; delete birdDog; cout << *germanShortHair;

Member Avatar for Ancient Dragon
0
68
Member Avatar for Chandrakumar

I copied book1.xls into IISServer c:/inetpup/wwwroot objConn.Open "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;DBQ=" & Server.mappath("/book1.xls") &";ReadOnly= true ; UID=admin;" Dim strSQL excelfilename = "Book1.xls" strSQL = "select * from " & excelfilename Dim objRS Set objRS = Server.CreateObject ("ADODB.RecordSet") objRS.Open strSQL, objConn,3,3 When I execute the page Error Type: Microsoft OLE DB …

Member Avatar for rajeev_cv_2012
0
296
Member Avatar for daino

I've installed the boost libraries binary version. How do I link this to my project? I've put the boost/bin path in my 'Path' environmental varialbe. Thanks

Member Avatar for daino
0
349
Member Avatar for Ranger86

Hello I'm new to C++ and am trying my best to learn the language. Could someone please let me know why my program is not working. I have a feeling that I'm not passing values to and from functions. The program compiles and runs, but it just gives me a …

Member Avatar for VernonDozier
0
319
Member Avatar for andigirlsc

In my function definitions under apply_discount, when I enter a 1 or 2 for the discountQues to see if the customer has a coupon, the program thinks I'm entering a ticket type (1=toddler, 2=junior, 3=senior). Can you tell me what I'm doing wrong? I already tried making discountQues a global …

Member Avatar for deepecstasy
0
257
Member Avatar for DaMaskMan2

What does the following code do? int number; int& atlas = number; number = 212; atlas++;

Member Avatar for mrnutty
0
58
Member Avatar for on93

can anyone tell me where is my problem ??? i cannot debug this program. -------------------------------------------------------------------- #include<iostream> #include<string> using namespace std; class student { private : string name; int id; float cgpa; public : void setName(string na); void setID(int number); void setCGPA(float result); string getName(); int getID(); float getCGPA(); void display(); …

Member Avatar for deepecstasy
0
132
Member Avatar for nyfan68

I am suppose to write a program that inserts 25 random integers from 0 to 100 in order in a linked list. The program should calculate the sum of the elements and the floating-point average of the elements. I have been stuck with the add and average functions for some …

Member Avatar for Geli19
0
580
Member Avatar for nmajon

hi.i have a big problem .i just learn about classes and i don't know too much.now i have to do a problem using classes but for strings.i have to do one class string and do : -create a string -display the lenght of string -comparison lexicographics of 2 strings -concatenation …

Member Avatar for mrnutty
0
123
Member Avatar for dot_binary

I'm using winapi function GetTickCount() with delta time and I'm calculating the displacement of an object on screen like this: number_Of_Pixels_To_Move_On_Screen = (speed*delta_Time)/number_Of_Pixels_Per_Milllisecond but I get uneven movement.Sometimes it moves a litle faster ,sometimes slower . Can someone tell me how to get the object to move at a constant …

Member Avatar for mrnutty
0
169
Member Avatar for jackshannon4

std::string s = "65//3"; std::istringstream indexBlock(s); for (int i = 0; i < 2; i++) { int index = 0; indexBlock >> index; std::cout << index << std::endl; } I would expect the output of the cout to be: output: 65 3 as I thought the stream iterates through the …

Member Avatar for jackshannon4
0
370
Member Avatar for magadascar

Hi Sir Referance to the previous article "C++ Help With Smallest Denominations of Coin Change" you suggested to use the code " CoinChanger::CoinChanger() ". And when I use it , it appear the error message " expected function body after function declarator" so could you please advise me regarding this …

Member Avatar for Ancient Dragon
0
51
Member Avatar for aaal

Hello, I have some problems with this code //Selection and Bubble are working #include <iostream> #include <cstdlib> #include <cassert> #include <ctime> #include "Sorts.h" using namespace std; typedef void (*SortFunction)(int a[], int n); int main(int argc, char *argv[]) { if(argc < 4) { cerr << "Usage: " << argv[0] << " …

Member Avatar for deceptikon
0
174
Member Avatar for Daniel BE

Dear friends, I want to create a program that reads 10 numbers from the user and store it in a file namely Numbers.txt. After that I have to read each numbers and if it is a Even number then it should be stored in a file "Even.txt" otherwise it should …

Member Avatar for deceptikon
0
251
Member Avatar for danibecse

How to print a sentence (including white spaces) from a file ? Or How to print entire text file which has a paragraph? I have tried a lot and the final programs is shown below.. but it can't print sentences exceeding certain length... it shows unwanted ASCII characters :( How …

Member Avatar for Daniel BE
0
3K
Member Avatar for mee_ram

Hi, I have used xerces for xml parsing and it was working fine. But recently (i didn't change any coding) the same code doesn't work and it crashs the application after executing the XMLDomParser::parse() --> fatalError() method. It gives an runtime error exception: xercesc_3_1::XMLErrs::Codes at memory location xxx. For a …

0
49
Member Avatar for celina1234

I am very new to programming language and need help urgently. I am running a program which gives me one output file for every 5 min simulation. i have to copy and rename the output file in each step so that they can be used in another program . Any …

Member Avatar for Adak
0
294
Member Avatar for litmah
Member Avatar for wids101

hi i have two question? if i wanted to read in file also, how do i do that? #include <conio.h> #include <iostream> #include <cstring> #include <ctype.h> #include <string> using namespace std; using std::string; enum CardType{ MasterCard, BankCard, Visa, AmericanExpress, Discover, DinersClub, JCB }; bool Validate(CardType cardType, string cardNumber){ int number[16], …

Member Avatar for VernonDozier
0
237
Member Avatar for ogrishmania

I'm sort of a begginer in classes. I must implement a simple problem: chosing a phone. I thought that I should make a program in which a user can select some conditions, like must have wifi or not, android or other, etc. and return a list with the phones that …

Member Avatar for mrnutty
0
285
Member Avatar for ppotter3

Hello! How is everyone? I know this program is somewhat simple, but I am working on learning classes, and I am trying to implement this in my code. I pretty sure my mathematics done in the program are correct, or at least on the write track. Here's what I am …

Member Avatar for magadascar
0
2K
Member Avatar for thechetantalwar

I have a created a small user interface in C++ using Graphics. Now i want to extend it. Such as i want to make it bootable, or how can it act as an Operating System?

Member Avatar for thechetantalwar
0
349
Member Avatar for sh2012.aps

i am using the url = "https://prd.aps.net/cm/json/login.json?username=aps@aps.com&pass=ca4433$$&apikey=1dd80ss107s3ad9593c857cc6d14d3a3" Note:: if iam using the http as a protocol it just grab the values in a few seconds(3 to 4) but using https its a big issue around 40 sec it takes when i am calling curl_easy_perform(curl) why so? please take a part …

0
161
Member Avatar for maclam13

I am trying to read data from a file in a loop. The file looks like this: X Joe Scholtz 437-4798 A Tim Wade 768-7658 X Sara Jobs 326-7857 ! Jaynce Bee 354-8678 (The X in front is for preferred or not preferred.) I am getting the first and last …

Member Avatar for Ancient Dragon
0
206
Member Avatar for manashmanash

define a program to represent a bank account.Include the following members: 1.Name of the depositor. 2.Account number. 3.Type of account. 4.Balance amount in the account.

Member Avatar for Lucaci Andrew
-3
210
Member Avatar for Jwerb86

Hey all! I'm trying to write a program that simulates a student database. From the user, it takes the number of students there are, their names, student ID's, and majors. I'm having a runtime problem with the code I have and was curious to know if anyone can help. It …

Member Avatar for Jwerb86
0
205

The End.