49,761 Topics
| |
I got a snippet off the web of how to download a file from online in c++ console with the curl library. so I installed curl, and copied the code snippet, but it doesnt work. Can someone show me whats wrong? [code]#include <curl/curl.h> #include <cstdio> // link with libcurl. eg. … | |
guys i need help ASAP since i need to submit this miniproject and i need 1 more minor questions need asnwered. the C++ coding is given below, i need to change it to function type but giving out the same output. #include <iostream> #define SIZE 7 using namespace std; int … | |
How would I go about refining a triangle? So far this is what my code looks like,not finished by far [CODE] class point {public: point(){} point(double i, double j,double k){x=i; y=j;z=k;} ~point(){} double getx(){return x;} double gety(){return y;} double getz(){return z;} bool operator == (point p){return (x==p.getx() && y==p.gety() && … | |
Dear friends: I need the vector computation as follows, for example: A=[1,2,3], B=[3,4,5] C=A+B; C=A-B;C=A+alphs*B; Could you please suggest me a C++ numerical library for this kind of computation. Regards | |
I'm trying to figure out how to do this program. A program is required to print and read a series of exam scores for students enrolled in a math class. The class average is to be computed and printed at the end of the report. Score can range form 0 … | |
Hey, so as you can tell, this is my first attempt at writing a class. I put in a mock int main() in order to follow what exactly is going wrong. As far as I can tell, every time the struct in push is used, it always has the same … | |
Hello everybody! I'm participating in a competition, and I just finished my program. It doesn't really matter what it does, and how. I have encountered a bug I think. I'd appreciate every kind of help, because with the problem, my solution fails for the test file. I have to read … | |
Okay so for my beginners c++ class we have to make game for our final project. The game is a simple shooter type game with ascii chars and stuff for the player and the enemy. We covered up to 2d arrays in class and then the teacher gave us the … | |
Now I have a lot of airplanes, in the ideal world the interface of the airplanes(or anything) should be unify but for some kind of weird reasons, the class for different airplanes are designed like this [code] struct airplane_A { fly_A(); speed_up_A(); //blah blah blah }; struct airplane_B { fly_B(); … | |
Hello... I'm practicing c++ and I'm trying to create a program with register and login in it.. the problem is I'm trying to compare the register username/password to the login username/password but even though the comparisons are right it's not working.. [CODE]#include <Windows.h> #include <iostream> #include <iomanip> #include <string> #include … | |
I am having problems with my program to add and multiply two 4 bit binary numbers. The part in which I am currently having trouble is when I run the program the output for the addition function is not correct. Instead of displaying the correct answer it is just displaying … | |
I have a text file with names, wins, losse. I have to take those in a write a function to find the average, and a function to sort the names in alphabetical order. I finally got everything into arrays but I cant do anything else. I don't think I'm understanding … | |
I am currently trying to create a list of skills and each list of skills generates 3 to 10 skills to put in the list and then randomly generates the skills that it places in that list. But I don't want skills repeating,meaning if I have 8 skills going in … | |
Yo guys! How's it going? To give you a quick gist of my goals : I want to allow the user to enter a bunch of criteria for a book (title, author, etc) so I made a structure. Then I store that structure in an array so they can enter … | |
Hey guys, what i'm basically trying to do in this code is to write an array which is automatically written to a txt file in the order I have shown below, however, I not only get this error [code] --------------------Configuration: testmtl - Win32 Debug-------------------- Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved … | |
Not sure I understand what is going on with setw(). [CODE] I would expect the program below to output something like this 77 77 77 77 Instead, it does this: 77 77 77 77 77 77[/CODE] Why are the first three 77's not indented? [CODE]#include "utility.h" // setw example #include … | |
Ugh! need help. Ok I am creating a form to calculate a conversion, actually one of 24 conversions to be decided by radio button. I placed the code to make the conversion under the "checkchanged" event of each of the radio buttons, turns out that's not a good idea as … | |
[CODE] #include<iostream.h> #include<stdio.h> #include<fstream.h> #include<string.h> class qa { char question[35]; char option[4][20]; int ans; //correct option no (eg 0 1 2 3) public: void getques() { gets(question); cout<<endl; } void getopts() {cin>>option[0]>>option[1]>>option[2]>>option[3]; } void getans() { cin>>ans; } }; void main() { int n; qa q; fstream file1; file1.open("questions.dat",ios::out); cout<<"\n … | |
Hello everyone. I'm having quite a rough time with my program because my code isnt just working [CODE]#include <string> #include <iostream> #include <string> #include <stdlib.h> #include <windows.h> using namespace std; #include "DBase.h" #include "Client.h" list <Client> l; DBase *example; int main (void) { string user= "my username"; string pass = … | |
Consider : char *n=123456; I want to convert it into: int b[]={1,2,3,4,5,6}; i.e. b[0]=1; b[1]=2; ..... b[5]=6; Please suggest the code to perform the same. Thank you.... | |
I've Just finished a program and it's taking various errors. Can you show me Where its wrong? [CODE]/******************************************************************** * Autor: Antônio Airton Cabral Neto * * Compilador: BC 3.1 Borland * * Ambiente: Tela de scroll do DOS * * Modelo de memoria: Small * * Data: 12/09 e 14/09 … | |
Hey I was wondering how I could write a binary file in Java with code in C++ using the reinterpret_cast function. If I remember the line correctly (not currently at work) it was: [CODE] file.write=reinterpret_cast<char *(&x)>,sizeof x; [/CODE] with x being a variable. How can I do that in Java? … | |
So I have to get a working program for analyzing text, picking up words that has got 2 symbols and which are numbers and if their sum is not more than 9 i has to delete them. I'm about to be done with reading and outputing text file. Theres also … | |
This program is suppose to be a very easy code of a simple time machine. I have it all layed out and working, but the out put it not computing correctly.. I know it is something easy, but i have been staring at this code for a bit now, so … | |
Here we have a code that opens a filestream from a notepad but it doesn't open the notepad file. I have also attached the folder of the program itself so you can check it as your reference. please help us. Thank you very much! Please help. hre [ICODE] #include <iostream> … | |
yet again i have become very confused on this program. This program is suppose to have the user be able to put numbers in from a keyboard or they have the choose of choosing a file with numbers in it. the program is suppose to acknowledge all the numbers in … | |
[CODE] template <typename T> int ct2 (tnode<T> *t) { int ctLeft, ctRight, ct; if (t == NULL) return 0; else { return ct2(t->left)+ct2(t->right)+ ((t->left != NULL && t->right != NULL) ? 1 : 0); } [/CODE] I tried running it and I still can't figure out what it does. Specifically … | |
I've been looking for an app that could find a specific open window on the desktop and 'lock' it so can't be re-sized or moved (most likely by using the title bar value/property). Having had no luck, I was wondering if this can be done in c++? I used to … | |
I am trying to solve this question (homework) that says the following : [QUOTE]Write a program that calls a function computeSphere that computes the volume and the surface area of a sphere with given radius. The function should not perform any I/O operations. [/QUOTE] the main problem is how can … | |
We are having problem with our code regarding file streaming. here is our code: [CODE]//Nava //Maganito //Ocampo //Lazo //Manata //CS133/BC2/PROJ #include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <cctype> #include <cmath> using namespace std; void display(); void input(); void equate(); void calculate(); void lineChecker(); double num1=0; double num2=0; double … |
The End.