49,761 Topics

Member Avatar for
Member Avatar for sharifyboy7

Implement the template class SortedList. Write a simple driver that reads values from file float.txt, inserts them into the list, prints the length of the final list, and prints the items. Add code to your driver to test the remaining member functions. Delete 3.3, 10.0, and 200.0 and print the …

Member Avatar for daviddoria
0
155
Member Avatar for HBK_100

[CODE] void RB_number() { int roomnumber; string category; string type; string status; float rate; int roomid; //Try,catch and throw statement for exception handling to catch errors that are inputed from the user try { cout<<"\n\n\t\t\tEnter the Room ID you wish to view:"; cin>>roomid; if(roomid < 0) throw "Error"; } catch(string) …

Member Avatar for daviddoria
0
107
Member Avatar for fu1five

This is C++ How to Program 7th Edition. I have to Modify the Package shipping program to include exception handling. Here is the code please help me modify this i started abit stuck need help exception handling. [code] // ExceptionHandling.cpp : Defines the entry point for the console application. // …

Member Avatar for daviddoria
0
196
Member Avatar for muthu1802

int k=i++ + i++ + ++i + i++; int m=j++ + j++ + j++ - j++; cout<<i; cout<<m; cout<<j; cout<<k; what is the precedence in linux compiler

Member Avatar for Ancient Dragon
0
184
Member Avatar for MyPianoSucks

Hey everyone, Today i was just studying C++ and i needed to do a simple program with a "GradeBook.h" file, a "GradeBook.cpp" and a "main.cpp".Just to test how class works . I had already wrote all source code for this files, but when it cames to compile nothing appears, i …

Member Avatar for MyPianoSucks
0
186
Member Avatar for muze

hello guys....I have a program which is a GUI. - When I [B]RUN[/B] the program and do some testing; it is good and nothing happens. - But on the same [B]RUN[/B], when I do some testing, it crashes. Every time I run the program, I find the same results. So …

Member Avatar for muze
0
82
Member Avatar for flide

Hello friends, I designed few classes to simulate any DFA and it runs fine, now I want to do the same for a NDFA. The major problem that arises with it is the possibility of transiting to multiple states on a single input and epsilon-transitions. for an overview i am …

0
274
Member Avatar for jasleen12345

[CODE]#include<iostream> #include<string> using namespace std; class string { char *a; int b; public: string() {a=0; b=0;} string(char *c) { b= strlen(c); a= new char[b+1]; //b+1 because one char extra for space strcpy(a,c); } friend void show(string s); friend string operator+(string &s1, string &s2); }; string operator+( string &s1, string &s2) …

Member Avatar for wickedflo
0
131
Member Avatar for mike_2000_17

Hey y'all, I was just curious about which idiom you prefer or use very often.. and why? Please vote on the poll! I understand that there are a lot of choices but you can vote for multiples, but try to pick only the ones you think are the best, or …

Member Avatar for mrnutty
0
209
Member Avatar for richardcyper

Hello everyone , Please can somehow help me with a hint of how to display all the smallest factor of a number ( e.g if i enter 120 the factors should be 2,2,2,3,5 .).

Member Avatar for mrnutty
0
52
Member Avatar for andrewjad

here's my code: [CODE=C++] #include <iostream> using namespace std; void func(int num) { num = num + 1; cout << num; } int main() { int num2 = 5; cout << num2; func(num2); cout << num2; func(num2); cout << endl << endl; system("PAUSE"); }[/CODE] when the program runs, it yields …

Member Avatar for andrewjad
0
208
Member Avatar for manutd4life

Hello, am working on a program like a database Here's the code: [code=c++]#include <cstdlib> #include <iostream> using namespace std; void addclient(void); void choice (void); typedef struct client{ int number; char name[35]; char gender[8]; char address[50]; char phoneno[15]; char mobileno[10]; struct client *next; } client; client *firstnode,*currentnode,*newnode; int clientid = 0; …

Member Avatar for manutd4life
0
113
Member Avatar for dinners

Hi there, I am very new to C++ and I want to create an array of variable length. I tried this: [CODE] int corners; cout << "Please enter the number of corners: "; cin >> corners; int x[corners];[/CODE] but it came up with errors: error C2057: expected constant expression error …

Member Avatar for dinners
0
162
Member Avatar for rlhh

Deck.h [CODE]#ifndef DECK_H #define DECK_H class Deck { public: struct card{int symbol; int value;}; card card_list[52]; void generate_deck(); void main(); private: static int const diamond = 1; static int const club = 2; static int const heart = 3; static int const spade = 4; }; #endif [/CODE] Deck.cpp [CODE] …

Member Avatar for rlhh
0
176
Member Avatar for Seapoe

Hello, I have implemented different sorting algorithms (bubble sort, merge sort, heap sort, etc...) and want to calculate the running time for each one on different sets of data. I'm using Visual Studiois but am familiar with Dev C++ and Xcode on Mac. I used C++. Is there some special …

Member Avatar for UberJoker
0
3K
Member Avatar for glenc70

ok i can easily make a server and client sockets in python because of the very easy library it comes with but is there a easy library as easy for c++ as the library that c++ comes with seems very confusing to me thanks in advance

Member Avatar for SgtMe
0
103
Member Avatar for lagvino_els

I'm coding about AA Tree and having some troubles of function: DeleteNode. Please help me how to coding about deleting a node in AA Tree! Thanks for your care!

Member Avatar for Narue
0
102
Member Avatar for precila

**Write a algorithm to accept 5 number and sort it in the ascending order using selection sort** #include<iostream.h> #include<conio.h> class selectionsort { Int a[100], n, i, j, temp, loc, min ; public: void in( ) ; void out( ) ; selectionsort( ) { Min = a[0] ; } }; void …

Member Avatar for geojia
0
192
Member Avatar for aaronmk2

I am writing a program using vector and am wondering if my destructor is correct, or do I need to add another line. The clear, clears all the elements in the vector, but do I need to add another line to delete the vector, and if I do what line …

Member Avatar for arkoenig
0
103
Member Avatar for xxunknown321

I believe the error has something to do with my mergeArray function. Its a modified version of the insertNode function. i tried to make it so that i can loop through and insert an entire array of elements into a linkedList. My program compiles without error but gives me a …

Member Avatar for xxunknown321
0
171
Member Avatar for frogboy77

Can anyone tell me if it is possible to set a value in an array to infinity and if so how to go about it? Thanks.

Member Avatar for frogboy77
0
72
Member Avatar for LoneStarMark

Hello All, Newbie C/C++ programmer (veteran VB) here with a problem I cannot get past: I am attempting to run/modify code created in Borland C++ v.6. When I try to run the code in the IDE I consistently get an EAccessViolaton with the line of code in the title highlighted. …

Member Avatar for LoneStarMark
0
131
Member Avatar for vanalex

Hello! I've written a class called Date: [CODE] class Date { private: int day, month, year; public: Date(); Date(const char *d); //other methods... }; [/CODE] I want to write a constructor that'll take as a parameter (as you can see) a c-string. That string will look like: "12022010". The first …

Member Avatar for vanalex
0
180
Member Avatar for Raja Paul

Hi, I want to create a project in vc++ which is having an explorer by which I can explorer the entire file system. I am using visual c++ 6.0. Anyone can help me?

Member Avatar for WASDted
0
92
Member Avatar for zacory

Hello, In s project I'm about to start I'm going to need the ability to search for files, so I figured I would use the _findfirst() function. I've used it in previous projects with no problems, but when I tested the function like so: [CODE] _finddata_t information; long reference = …

Member Avatar for zacory
0
144
Member Avatar for halopower67

Ok guys so i have a project to do for my c++ class and its supposed to be about two ships (one the player, the other one the computer) and they are on a 10x10 plane created by an array. I did the plane, now how do i get the …

Member Avatar for invisal
0
120
Member Avatar for Kakashi Hatake

I am not able to get GDB to start in -tui mode. My OS is Win XP, here is what i do START->RUN->cmd([B]gdb -tui[/B]) gdb:TUI mode is not supported [B]gdb[/B] GNU gdb [U]6.8[/U] .... .... ....... This GDB was configured as "i686-pc-mingw32." I know that GDB supports tui mode from …

Member Avatar for Kakashi Hatake
0
2K
Member Avatar for zhuimeng

Event in application log suggest to use sxstrace.exe utility to diagnosis, result of sxstrace.exe is: -------------------------------------------------- ================= 开始生成激活上下文。 输入参数: Flags = 0 ProcessorArchitecture = x86 CultureFallBacks = zh-CN;zh-Hans;zh;en-US;en ManifestPath = E:\3D-TEST\program\1.0.0edition.exe AssemblyDirectory = E:\3D-TEST\program\ Application Config File = ----------------- 信息: 正在解析清单文件 E:\3D-TEST\program\1.0.0edition.exe。 信息: 指令清单定义标识是 (null)。 信息: 参考: Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50608.0" 信息: 参考: …

Member Avatar for Ancient Dragon
0
236
Member Avatar for lochnessmonster

[CODE]std::wstring isAdmin() { SID_IDENTIFIER_AUTHORITY pIdentStruct = SECURITY_NT_AUTHORITY; PSID ptrSidStruct; BOOL isMember = false; if (!AllocateAndInitializeSid(&pIdentStruct, 2,SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &ptrSidStruct)) { return L"Unable to allocate & initialize SID struct"; } if (!CheckTokenMembership( 0, ptrSidStruct, &isMember)) { FreeSid(ptrSidStruct); return L"You do not have administrator priveledges."; } else …

Member Avatar for mitrmkar
0
1K
Member Avatar for aabi

hi,.,.. i knwo its sound too fasicinating (about title)... and u might b thinking i would be a some kind of rocket programmer or hve gr8 skill over various programming languages ,,.... :icon_question: but unfortunately i dont fall in any these category ,.. actually i'm a student of computer science …

Member Avatar for Elihu5991
0
214

The End.