49,755 Topics
![]() | |
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 … | |
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]:) | |
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. | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … ![]() | |
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 … |
The End.