49,761 Topics

Member Avatar for
Member Avatar for frogboy77

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 …

Member Avatar for arkoenig
0
101
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
899
Member Avatar for exekiel101

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 …

Member Avatar for Duki
0
100
Member Avatar for xiansen

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. …

Member Avatar for Duki
0
292
Member Avatar for MivanF
Member Avatar for Rajkamalwin

//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; …

Member Avatar for Ancient Dragon
0
88
Member Avatar for Empireryan

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. …

Member Avatar for Fbody
0
525
Member Avatar for miznogud

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 …

Member Avatar for Sodabread
-1
79
Member Avatar for jjf3rd77

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 …

Member Avatar for hupy
0
852
Member Avatar for VBNick

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 …

Member Avatar for mike_2000_17
0
181
Member Avatar for AutoC

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); …

Member Avatar for AutoC
0
249
Member Avatar for upid

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, …

0
38
Member Avatar for shrublet

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 …

Member Avatar for NicAx64
0
154
Member Avatar for sadaka

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 …

Member Avatar for sadaka
0
153
Member Avatar for chris forgeard

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 …

Member Avatar for embooglement
0
154
Member Avatar for cpeepee

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 …

Member Avatar for cpeepee
0
151
Member Avatar for bmos31

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 …

Member Avatar for bmos31
0
194
Member Avatar for jumpdlite

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 …

Member Avatar for NicAx64
0
161
Member Avatar for chris forgeard

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 | …

Member Avatar for Narue
0
131
Member Avatar for civus

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 …

Member Avatar for civus
0
261
Member Avatar for grahf23

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> …

Member Avatar for grahf23
0
152
Member Avatar for David_Omid

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 …

Member Avatar for David_Omid
0
89
Member Avatar for AutoC

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?

Member Avatar for Ancient Dragon
0
111
Member Avatar for tennis

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

Member Avatar for Duki
0
90
Member Avatar for dflatt

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 = …

Member Avatar for dflatt
0
111
Member Avatar for PixelExchange

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 …

Member Avatar for PixelExchange
0
116
Member Avatar for ataomega

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 …

Member Avatar for ataomega
0
834
Member Avatar for senthamizh

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; …

Member Avatar for dusktreader
0
143
Member Avatar for SkonTeam

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, …

Member Avatar for SkonTeam
0
160
Member Avatar for CPT

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 …

Member Avatar for CPT
0
149

The End.