49,757 Topics
| |
Here's my code: bigInt.cpp [CODE]/ // bigInt.cpp #include "bigInt.h" bigInt::bigInt() { int i; for(i = 0; i < SIZE; i++) //Sets all the values of digits to 0. digits[i] = 0; sign = true; numDigits = 1; error1 = true; overflowFlag = false; } bigInt::bigInt(const char temp []) { int … | |
Hey all! I am interested in learning to use sockets. make client and server program. Where should I begin? Thanks! | |
I have a Graph that I'm making using an adjacency matrix to hold edge values. The noEdge value is zero and all edgeweights are positive integers. I have to delete a node from this graph and I'm having trouble figuring out how to update the Adjacency matrix after the deletion … | |
im trying to overload the operator+= and use that to implement operator+ in my string class. i keep getting a segmentation fault when i try to evaluate something like s1 += s2 where MyString s1("");and MyString s2("hello"); any suggestions as to why this is happening? this is my operator+= function … | |
Hi, Is there any possible way to create program which'd take some data from net and store it in program memory ( some variable, irrelevant ), for example - currency list? If there's no way in console, what about using Borland Builder 6? I hope my idea ain't so absurd … | |
I am trying to write a lexical analyzer program that will read in input from a file and produce a formatted output. I need help as I am stuck. I am sure I am not passing the file stream, and the function parameters correctly. Do note some of the functions … | |
Help! Why am I getting the following error on line 100?? I don't get an error when I use storage in other places? error C2065: 'storage' : undeclared identifier [CODE]#include "utility.h" struct masterFile // master file record { int employeeID; string employeeName; string departmentID; int YTDhoursRegular; int YTDhoursOvertime; double regularPayRate; … | |
I have a student name, wins, losses. In that order in a txt file. I'm trying to read it in and them print it out, but i'm not real sure what I'm doing [CODE] #include <iostream> #include <fstream> using namespace std; const int MAX_SCORES = 50; ifstream infile; void report(int … | |
Hi i had to write the program that prompts the user for integer values. Place these values into an array. What i cant figure out is the following i will be highly thankful to you if you can help me on these [I]Compute Sum – add up all of the … | |
Hi, I am running an application and wish to add random outputs when the user answers correctly. example 1 + 1 = 2 cout << " great"; I wish to randomly cout << excellent or very good or fantastic as well. Thanks! This is my code: #include <iostream> #include <cmath> … | |
So new here to daniweb and just finished my first semester of programming 1 and I'm trying to do some extra curricular work to get me prepared for my spring semester. Would appreciate any and all help or suggestions anyone could give me. Here's the issue: So i was trying … | |
Hi, I'm wondering how to remove a specific part of a string.. [CODE] #include <iostream> #include <string> using namespace std; int main() { string str1 = "How,Are"; cout << str1; //remove the comma, and everything behind the comma! so the output would only be 'Are'. return 0; } [/code] Thank … | |
NEWB alert, lol. This was homework that I failed because i didnt turn it in on time. I didnt turn it in due to the fact that i took an online course, my book sucks and my instructor only checks his e-mail once a wk. that and i couldnt for … | |
my code: [CODE] ... DWORD WINAPI myGWTHPID(HWND hWnd, LPDWORD lpdwProcessId){ __asm { MOV EDI,EDI PUSH EBP MOV EBP,ESP JMP [DLLFunc] } } int main(){ hInst = LoadLibraryA("user32.dll"); DLLFunc = (DWORD)GetProcAddress(hInst, "GetWindowThreadProcessId" + 5); HWND hwn= FindWindowA(NULL,"Untitled - Notepad"); cout<<"Window handle: "<<hwn<<"\n"; DWORD pID; myGWTHPID(hwn,&pID); cout<<"Process id: "<<pID; getch(); return 0; … | |
I am making a calculator which shoul not use cmath.h. I was just thinking that how is it possible to calculate trigonometric functions without cmath.h. Please help me. Thanks in advance. | |
I'm trying to write a program that will read in a file to a 2-d array and find out how many groupings (blobs) of characters there in the file. It then uses a recursive function to delete the already counted blobs, to avoid recounting. The program compiles fine, but when … | |
I have a project that I have formatted for Doxygen. I use extra header files to hold extra classes. The thing is that Doxygen only generates documentation for the first header file. How do I get it to document all of the files I specify? | |
I am having trouble with my looping sequence in this program at the end of the program it will let the user choose if they would like to exit the program or start all over again and it exits for both chooses and sometimes it will continue on to the … | |
HI All, I am having a little difficulties here. Here is my requirements: Play the game of paper-rock-scissors. In main ask the user how many hands he/she wants to play. This must be an odd number, so you must validate this input to make sure the number is odd! After … | |
#include <iostream> using namespace std; int main() { int n1,n2,n3,n4,n5; cout<<"input number\n"; cin>>n1; cout<<"input number\n"; cin>>n2; cout<<"input number\n"; cin>>n3; cout<<"input number\n"; cin>>n4; cout<<"input number\n"; cin>>n5; if (n1>n2 && n1>n3) return 0; } | |
#include<iostream> using namespace std; int main() { int n1,n2,n3,n4,n5; cout<<"input number1\n"; cin>>n1; cout<<"input number2\n"; cin>>n2; cout<<"input number3\n"; cin>>n3; cout<<"input number4\n"; cin>>n4; cout<<"input number5\n"; cin>>n5; if(n1 < n2) n1 = n2; if(n1 < n3) n1 = n3; if(n1 < n4) n1=n4; if (n1<n5) n1=n5; cout << "The largest number is\n" << … | |
i can't find what's wrong w/ my program. the output is wrong when i type long names and names w/ less similar letters (sorry for my english i'm a filipino) [CODE]#include <stdlib.h> #include <iostream.h> #include <string.h> #include <conio.h> #include <stdio.h> char name1[20],name2[20]; int count1[25],count2[25],temp1,temp2,total; void flames(int num) { switch(num) { … | |
Hi, I would like to read a directory, and get all the files in that with some kind of sorting, let us say sort by timestamp. Can you help me, here is my code so far: [CODE] #include <stdio.h> #include <iostream> #include <sstream> #include <fstream> #include <cstdlib> #include <vector> #include … | |
Sir, Kindly tell me what is the library name for the c++ in linux. I know for c it id libc.so ,,similarly for c++ what is the library name and how can i get it for my linux. I wrote a simple c++ program and executed it is working but … | |
Hello there, submissiontime length finishtime remainingtime 1031 17:11 574.1025391 MB 1050 17:30 1 1326 22:06 536.0175781 MB 1343 22:23 2 2721 45:21:00 608.1279297 MB 2741 45:41:00 3 32 0:32 575.8115234 MB 51 0:51 4 1161 19:21 652.6259766 MB 1182 19:42 5 937 15:37 288.7597656 MB 946 15:46 6 3087 51:27:00 … | |
How can I resize console window in dev-c++ ? | |
As I stated in the title i am having the issue where the object 'bj' does not call any of the functions that are within the class. I am stuck on this issue. Any help will be a appreciated. Thanks in advance. [CODE]#include <iostream> #include <cstdlib> #include <ctime> #include <string> … | |
vista home premium Adobe CS5 Design Premium Acrobat X Pro Dell desktop (silvery gray):) Everything on my machines is properly licensed and registered. EVERY time I launch Acrobat X Pro I get, "MS Visual C++ Runtime Error Acrobat X/.../Acrobat.exe This app has requested Runtime to terminate it in an unusual … | |
I have been working on my code today and have minimalized my errors. Sadly, I still have a few errors left I can't figure out how to solve. [code] 28 F:\Program6-Arrays2.8.cpp cannot convert `double' to `double*' for argument `1' to `double getInput(double*, int)' [/code] [code] #include<iostream> #include<cmath> #include<conio.h> #include<iomanip> //needed … |
The End.