49,755 Topics

Member Avatar for
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
843
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
248
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
37
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
148
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
150
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
193
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
130
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
260
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
88
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
108
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
89
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
110
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
115
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
832
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
142
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
Member Avatar for Ritesht93

Hello!! Can u all tell me what are different types of apps......lyk console apps,win32 apps etc.....what is basic difference between win32 n console apps.............. [B]THANKS IN ADVANCE!![/B]:)

Member Avatar for daviddoria
0
62
Member Avatar for Member 784689

I'm trying to make a simple visual C++ app that searches directories in the file system based on the user's selection. The form view is attached.

0
45
Member Avatar for dorien

Hi, I found a number of post talking about this in C, but could not solve it in C++. I have 4 hex characters to represent a length. These need to be stored like this, in the case where length=16 ([URL="http://www.easycalculation.com/decimal-converter.php"]this online converter[/URL] told me that 16 converts to A …

Member Avatar for dorien
0
4K
Member Avatar for Arthas

I am a complete begineer in this field [B]multithreading.[/B] I have searched the internet; came across these [B]POSIX[/B] and [B]BOOST[/B] things. I dont know how to start. Can anuone guide me..I had downloaded the BOOST library but I couldnt find anything regarding the POSIX([I]and ? is the pthread[/I]). Which to …

Member Avatar for Arthas
0
159
Member Avatar for techie1991

I have just started writing C code in dev-c++. The programs are running fine, but each C program shows me the following warning: [QUOTE] [Warning] command line option "-fno-access-control" is valid for C++/ObjC++ but not for C[/QUOTE] The test program I used was: [CODE] #include<stdio.h> int main(){ system("pause"); return 0; …

Member Avatar for Kanoisa
0
555
Member Avatar for helpme87

so i am trying to write a program that reads some data in from a text file and performs an operation on that data. the text file is as follows... [CODE] 611111 5 765676 4 876787 4 987897 2 611111 4 [/CODE] now i want the program to read that …

Member Avatar for mrnutty
0
146
Member Avatar for Ritesht93

Hey guys!! i m a student.....n tryin 2 make a game in C++.....game is goin on very well but i hav a question. i m using borland c++ 3.0 compiler....i hav 2 necessarily use this bcoz v hav d same compiler at high skool.....i'll start using d latest within few …

Member Avatar for embooglement
-1
136
Member Avatar for CJX3711

I'm trying to send variables from a program in C++ to php for it to process. Then I want to be able to get the output of the php code. Is there any way to send variables from C++ to PHP and back? Maybe using something like POST variables? I …

Member Avatar for CJX3711
0
134

The End.