49,761 Topics
| |
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 … | |
[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) … | |
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. // … | |
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 | |
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 … | |
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 … | |
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 … | |
[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) … | |
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 … | |
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 .). | |
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 … | |
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; … | |
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 … | |
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] … | |
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 … | |
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 | |
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! | |
**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 … | |
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 … | |
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 … | |
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. | |
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. … | |
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 … | |
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? | |
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 = … | |
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 … | |
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 … | |
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" 信息: 参考: … | |
[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 … | |
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 … |
The End.