49,761 Topics
| |
Hey there, this code was supposed to work out th GCD of 2 numbers added cout line in function and code seems to be running fine but it returns 4249024 instead of 29 this is probably a basic error on my part but can anyone tell me why? thanks for … | |
Hi, I'm trying to develop application with separation of UI/BL/DAL. I have read a lot of theories and I'm trying to develop a blue print for my application. I have no problem in UI thing. But I have problem with designing Data Access Layer. It will basically be a SQLite … | |
ive already run the installation wizard and why i always run the main setup the thing that comes out is this "a previous installation of visualsourcesafe at D:visual basic 6.0\VSS\ select yes to replace it with VSS6.0 or no to install and no to its default" 5then i encountered this … | |
You are to write a program that plays the game of “Guess the Number”. Your program is to randomly choose a three-digit number, allow the user to guess, provide feedback indicating if the users’ guess was too high or too low, and count the number of guesses the player makes. … | |
//i am writing a code that read from a file and store words in an character array but //in the wriiten by me,it is compiling but not extracting words in the array. [CODE]#include<iostream> #include<fstream> #include<string> #include<string.h> using namespace std; int main() { ifstream fin; char ch; int j=0; string line; … | |
I am writing code for a guessing game program. The game is supposed to generate a random number, 3 digit number and let the user guess what it is, providing feedback for every wrong input. It is also supposed to perform 10 iterations, keeping track of the number of guesses. … | |
The insruction is create a program that asks for two input srings until the character 'x' is encountered. For each input string display as output its length, its reverse and the concatenation of reversed inputs (see output below). Sample output: Enter 1: Hellox enter 2: Goodbyex the inputs are: Hello … | |
Hello all I am new to this community have found help on it without even joining however I cannot find a solution to my specific problem... Write a program that reads five numbers (each between 1 and 30). For each number read, your program should print a line containing that … | |
I have a simple web server built, and I created a status window that runs on a separate thread. If I have a list of structs being updated by the main thread, is it ok to read(only read) from those structs from the second thread for the purpose of getting … | |
Hi, I have a string that looks like this \\x\\y\\z-Select * from x where y=z I need to split this at the '-' into two strings. When I use substr as, [code] string s = "\\x\\y\\z-Select * from x where y=z"; size_t p = s.find("-"); if(p!=string::npos) string query = s.substr(p+1); … | |
bool I8051::Hex2Short(const char* buf, unsigned &val) { int i; if( sscanf(buf, "%x", &i) != 1 ) { cerr << "Error: hex file error." << endl; return false; } val = i; return true; } //---------------------------------------------------------------------------- bool I8051::Load(const char* buf, unsigned char* rom, unsigned& prgSize) { unsigned temp; unsigned len, base, … | |
Hello, all! :) Let me preface this by saying that I am a computer science student with only a rudimentary introduction to C++ so far, having worked mainly in Java up until now. I apologize if this is an overly simplistic question. A relative of mine has asked me to … | |
Hey how's it goin' every body, I am pretty new to opengl so please bear with me a little k. Here goes... I downloaded glut.dll,glut.lib and glut.h. Placed them in the following directories: glut32.dll to windows system32 directory, glut32.lib to dev-cpp lib directory, and glut.h to dev-cpp gl directory. Yet … | |
Here is my code excuse me if it seems a bit off i've only been coding for a day :) What I want it to do is in the comments at the top [CODE]/*====================================================================== IN THIS PROGRAM I WILL TRY AND SCRIPT A CONVENTIONAL CALCULATOR WITH THE USER ENTERING THE … | |
I've read a few threads on this site; all seem to provide almost everything I need to complete this project, but I just cannot get there. What I am trying to do is, instead of reading the raw text from a local text file and counting the word, have the … | |
I'm having trouble even getting started with this problem. I've tried looking at other examples, but I'm completely stuck. The question and my code(not even sure if im on the right track) is as follows: Write a function called decToBinaryString that recieves a non-negative int and returns a string that … | |
i am to write a C++ program to output the binary (base – 2) representation of a decimal integer. the program should accept a positive integer from the user. After verifying that the input is valid, the program should call a function named toBin, which outputs the binary representation of … | |
Hey I've only been coding for a couple of days and I got this code im working on for some reason the computer only guesses the number 42 instead of a random number can someone help me? Heres the code: [CODE]/*========================================================================\ |This is basically the guess my number game | … | |
Hi Guys, I'm wondering if someone can help me out with a problem I've been having with VC++. I'm obviously just beginning to learn C++ and have been working with CodeBlocks and VC++ 2010 Express. My problem is that the following code compiles in CodeBlocks but gives me numerous errors … | |
Hi, i'm new to C++ and been trying to write a simple program to compare the randomly generator number with the number input. But once i got the num1 = num2; the program keep prompting for new input. Any help would be appreciated. Thanks in advance! [CODE]#include <iostream> #include <stdlib.h> … | |
Hey guys, I was wondering if any of you could help me with some stuff which may seem obvious to you but I'm a beginner. I'm making a calculator and have reached the part where I am making the buttons change the string on the calculator's "screen". The way I … | |
Hi, I have a struct that looks like this [code] struct Info { char **field_names; double **data; int *cindex; } [/code] I have to serialize an object of this struct and send it over a socket and deserialize at the other end. What is the best option for this? | |
say iter1 and iter2 are both iterators [CODE]*iter1++=*iter2++;[/CODE] what does this line means? Can anybody help explain? ++ and * which is done first? thanks | |
I can't decide what data structure to use for a program I'm making. the program I'm making is a football table, the variables used so far are; string team; int played = 0, goalsfor = 0, goalsagainst = 0, goaldiff = 0, win = 0, draw = 0, lose = … | |
I have recently stumbled upon a program that permits a person to have an animated image "dance" across the users' current active window. The problem is.. something very strange occurs when I have this animated image dancing across MY program's main window. For some reason, whenever I either maximize or … | |
hello all i'm using cUrl and mysql in PHP but new to c++ for connecting to remote mysql database and run query what i need? should i install mysql connector? where are mysql libraries? may i download a large file for example 400 mb in c++ using cUrl ? i … | |
I have a problem when i am writing into files in a binary format.I have noticed that, it writes two times into the file. Here i have attached the code. [CODE] #include<iostream> #include<fstream> #include<string> using namespace std; class bank { protected: char receive[20]; public: } int main() { fstream file; … | |
Hi all, i am just asking for help to make this code work, i wrote it but it just tell me "too many arguments for Binomal Function" What should i change ? [CODE]#include <iostream> #include <cmath> using namespace std; long factorial (long); long binomal (long); int main() { int x, … | |
Hello everyone, I'm not that much of a talker so I'll get straight to the point: I need to implement a hash table in C++, After reading about this topic and algorithms from the book by Cormen, I started to implement it. I wrote it, but it doesn't work how … |
The End.