49,761 Topics
| |
hello friends iam not able to get logic behind solving the question mentioned below,,,,i tried a lot using various books.....online tutorials but at the end just lost it...... you ppl are kindly requested to provide me help in order to save my interest in programming..... ok the question is: Write … | |
Here's good question for the gurus around here. So we got a wofstream output. In it I send using a recursive function time by time a CString data. Using off course the GetBuffer member to get a pointer to the content. The problem is that it works really good till … | |
Hi guys. Can anyone please direct me to a site where i can read about multi threading for a begginner? All the sites i seems to be finding seem sketchy. | |
well i got some problems: 1. instead of 6 7 or 8, i get a value of minus 3 millions. 2. the money function isn't working 3. the for-loop of the program either never ends, or is only run once 4. and many more smaller problems (sorry that all the … | |
how can i use a string? what should i include to run string like "technogeek" is it #include <string.h> or what and what is the syntax for string | |
I was given the problem to write a class called block cipher to take in a text file and output the same text file after it has been encrypted. I have to use this header file... [CODE]#include <iostream> using namespace std; class block_cipher { public: block_cipher(); // Constructor void finish(); … | |
Hello Everyone, Need your comments on : "Can over running of array lead to the catastrophic failures ? " May be the answer is YES. "Then, why does not c++ provide bound checking on array operations and who is responsible to prevent array overruns ?" regards, MKQ | |
i have to write a code for compression of lines with redundancies. You are supposed to enter a line of code--for example(YES I CAN! YES I CAN! YES I CAN!) and your output should look like this (3YES3I3CAN3!) so the codes job is to count the number of times a … | |
nvm - this topic can be closed sorry for wasting space | |
the title says it all.. if any1 happen to see one , can post the link to me? thanx!! i need it to do my assignment .. but i cant find any program as long as that! tq! my assignment task is to find a program written by other ppl … | |
Hi guys, I have an array which reads in a file and displays it to the screen. The output is as follows: 1 0 0 2 0 0 3 0 0 4 1 2 5 1 2 6 0 0 7 3 4 8 5 6 9 7 8 10 … | |
As the title states.. is it possible to pass two variables back from a float function.. one through 'return variable' & the other through reference? If it is i will post the code.. but after hours of debugging & the program is still not recognizing the changed reference parameter (but … | |
Hello, I have a vector of smart pointers and I'd like to NULL smart pointers in reverse order. Smart pointers are done with boost::shared_ptr<>, this is the code: [code] // List of pointers typedef boost::shared_ptr<int> TSmart; std::vector<TSmart> Vec; // Make sure that everything is NULL std::transform( Vec.rbegin(), Vec.rend(), TSmart()); [/code] … | |
i would like to add graphics to to the "8 queens problem" with a 8*8 grid colored in black and white with the 8 queens placed on the board and moving them using the arrow keys is that possible plz help me it is counted for my annual exam i've … | |
[code] class Movie{ private: string director,title,genre; public: Movie(){ director="";title="";genre="";} int main(){ Movie a();} [/code] I am having problems with my default constructor. my program compiles but it gives me a warning "warning C4930: 'Movie a(void)': prototyped function not called (was a variable definition intended?)" and if i try to run … | |
Don't know if anyone here will be able to help me - but here I go. I'm reading [i]Beginning Game Design[/i] by Jonathon S. Harbour. In a chapter on DirectSound, the author says to go the DirectX SDK, and then go to \samples\c++\common to get four files (dsutil.h, dxutil.h, dsutil.cpp, … | |
Hi all! I've been searching the internet and various C++ books for quite some time now, and I appear to have reached a brick wall. As suggested in a given algorithm written by my professor, during input validation, if the stream goes into failure, I am to "reset cin" followed … | |
[code=c++] #include <stdio.h> #include <iostream> #include <string> #include <vector> using namespace std; vector<string> g_split_string(const std::string& str, const char c) { vector<string> v; cout << str << endl; string::const_iterator s = str.begin(); bool flag = true; // continuous c while (true) { string::const_iterator begin = s; while (*s != c && … | |
-------------------------------------------------------------------------------- I am trying to do a program that will use a function to search a string for an occurence of another string. Can someone please tell me what is wrong with this? [CODE]#include <iostream> #include <cstdio> #include <cstring> using namespace std; void replaceSubstring(string, string, string); int main(){ string string1, … | |
Hello(repost)- I am reposting because I didn't get the answer I needed. My teacher gave us this problem in a lab and I need help with it. Basically, he wants us to write an algorithm to count symbols. The user will provide anywhere between 3-10 symbols and then an initial … | |
Hello, i have rather curious question, i have an array of integers, but i need/want to put them as a single strings which separates the rows with newline characters... does anybody have any idea on how to create a string from an array of integers? please, and thank you! | |
Create a class in C++ name Height with the following Data members Feet Inches The Height class presents Height in Feet and Inches. For instance, Height (4, 3) means 4 feet and 3 inches. The Height class you will design should have the following features. Constructors Class must have 1. … | |
this is a part of my graduation project on Minority Game, I have problem with changing MemValues after first it iteration, at the first iteration I need random values, but after that i will have 1 Last win wihch would be the temp[m_nMemory-1] and then eache value should be shift … | |
I am trying to write a program that will flip a coin 100 times and count the number of times it lands on heads as well as the number of times it lands on tails. I have a function, flip, that returns 0 for tails and 1 for heads. When … | |
Hey, Is there anyway to control a volatile number of objects (don't know if I'm using the right term here... I mean when you don't know how many of an object you're going to have at any one time), like bullets in a shooter. If you have a bullet class, … | |
Hello, I have been stuck on this for awhile, and can not seem to get it to work exactly correct. I am trying to read in a file ("in_text.txt") and print out it's contents to the screen for now (eventually i will manipulate the data with a block_cipher class). Here … | |
Ok.. I use c++ numerous times to stream an output to script's to do further operations. Sometimes I need an email script, and will output one and manipulate the script with c++. As dumb as a question as this is I just want to clear my confusion before I go … | |
Introduction Reverend Zeller developed a formula for computing the day of the week on which a given date fell or will fall. Suppose that we let a, b, c and d be integers defined as follows: a = the number of the month of the year, with March = 1, … | |
Hi there I am writing a simple while loop which terminates on the condition that a certain value is found, as follows [code] std::string question = q.quest().que(); std::string answer = q.ans().answer(); std::string graphic = q.inf().info(); std::string english1; std::string english2; std::string arabic1; std::string arabic2; while((answer != english1) || (answer != english2)) … |
The End.