49,761 Topics
| |
Hello, I've come across [URL="http://www.daniweb.com/software-development/csharp/code/258293"]this thread[/URL] while trying to embed a mp3 file in my .NET project, but am having some problem, despite how simple this tutorial is, and just about every other thread on the internet say the same thing. After adding my file to the solution explorer, I … | |
Hi, i am doing a multiple-file project and i come across a difficult obstacles. I want your help, DaniWeb readers on this problem, which i find very strange: [CODE] #include "stdafx.h"//i have included vector header here #include "globals.h" #include "functions.h" using namespace std; #ifndef CPIECE #define CPIECE class CPiece { … | |
so basically i want to be able to organise info in my console application, im a beginner with C++ but im making a server for a game. Basically at the moment the playerlist looks like this: [ICODE]player [32] |Kills: 30 |Deaths: 45 tt [32] |Kills: 222 |Deaths: 2[/ICODE] im using … | |
I've been trying to make a reliable IRC client for a while now, and I know very little about sockets. I have read the RFC quite a bit, but programmatically responding when appropriate, and detecting errors still boggles me. How is the program to know the server will send three … | |
I'm working on my take home final for my Intro to Programming class and need to add the ability to search my class.txt file for a specific record by inputting the student ID. I can't for the life of me figure out what needs to be done. [CODE] #include <iostream> … | |
The error I'm getting makes NO sense seeing as I'm defining the functions it's confused about directly above. The error: undefined reference to `accMan()' undefined reference to `bookMan()' undefined reference to `lend()' undefined reference to `getBack()' undefined reference to `tellMenu()' undefined reference to `tellMenuAcc()' undefined reference to `tellAllBooks()' undefined reference … | |
Hi, In Visual Studio CLI. I have randomly generated numbers which are a,b,c,d . One by one they are meaningless . Together they create a color code for different products. For example : id | a | b | c | d | i | 1 | 1 | 5 … | |
hello everyone, i am trying to implement save,load and replay in my chess game made in c++ console. i am done with save and load but stuck on replay. i want every turn to be stored in file and when player asks to replay it should show all turns in … | |
My enscription program enscripts the words in a text file, but when I descript it is all mixed up eg. Origanal text: Name: Master Surname: Hacker Age: 1101 Enscripted text: 6BX5 6BX5 + BX0 6BX5 + BX0 9BXIIHI Descripted text: Name: MasteName: MasteName: MasteName: MasteName: MasteSuName: MasteName: … | |
these code, I expect they work the same. using Code::Blocks as the compiler, the result is differ result = output 10 return 0 [CODE] #include <iostream> int main() { int i = 0; while(i < 10) ++i; std::cout << i << std::endl; } [/CODE] result = compile error. [CODE] #include … | |
Given a multiple-choice test of 10 questions with 5 possible choices (A-E). The answers are given in a text file a long with the student names. Write a C++ program that does the following: 1.Reads the key answers to an array from the input file. The key is the first … | |
How can I memory N words using only pointers[Dynamic Memory] ? I tried something but I believe it's not well coded. [CODE]#include<iostream> using namespace std; int main () { char **a; int N; cout<<"Enter the number of words = "; cin>>N; for(int i=0;i<N;i++) { cout<<"Enter word number "<<i<<" : "; … | |
For the life of me, I can't figure out what I am doing wrong! It has been sometime since I have had use for my own list type, but since std::vector is pretty worthless for what I need it to do, I need to relearn templates. [code] #include <memory.h> template … | |
[CODE]#include <iostream> #include <iomanip> #include <map> #include <time.h> #include <cstdlib> using namespace std; //displays the instruction of the game void displayInst(){ for ( int b = 0; b < 28; b++ ) cout << "* "; cout << "\n* Game Title: NUM-BERS *"; cout << "\n* *"; cout << "\n* … | |
Disclaimer: the following question is not for homework or a class assignment....just practice I'm am trying to load an array with a file extension, based upon user input. The proper extension is present in the function, but when I print in main() to test, all I get is junk. This … | |
There's the text given (Duomenys.txt). The program removes vowels of the longest words in each line. How do you redo the program to find numbers in the line (starting with -+0123456789) and insert the word NUMBER before these numbers (in the results file). [CODE]const char Cduom[] = "Duomenys.txt"; // data … | |
In file i have a text. Words form line to line dont raising. Word in line separate least one space.Spaces can be at line begining and ending, can be empty lines. Count how many words can be in real number. i need a function whitch can count words whitch can … | |
The code posted below is giving an unusual error which i cant get to figure out. According to me the error is caused by the definition(or maybe by the initialisation of the string array). The error is comin in the vending.cpp file in the initialisation of the [I]product[10][/I] array [CODE] … | |
Hi.. can anyone help me.. I having problems in displaying the output read from an input file. when I run the code, it only display the output of the first character in the input file. Anyone can help me figure out the problem? & I'm using borland. [CODE]#include <iostream> #include … | |
[code] #include<iostream> #include<string> #include<vector> #include<boost/spirit/include/phoenix.hpp> #include<boost/spirit/include/karma.hpp> struct test_spirit { void read_function(std::string &result, std::string const &val) const { if(result != "memo_zero") result += val; } }; void spirit_01b() { std::vector<std::string> data; data.push_back("memo_zero"); data.push_back("memo_two"); data.push_back("memo_three"); std::string temp; test_spirit ts; karma::generate ( std::back_inserter(temp), ( karma::string[phoenix::bind(&test_spirit::read_function, &ts, karma::_1, karma::_val)] << ", " ), data, … | |
I'm using Turbo C++ v3 and I want to convert a string which contains hexadecimal numbers into a decimal integer. How do I do that? | |
For my SIC assembler written in C++ , I need a hexadecimal integer as the location counter. That is if LOCCTR=A and LOCCTR++ should store B in LOCCTR. Is there such an variable in C++? If so how do I make it Hexadecimal?? I know how to Initialize an int … | |
Dear friends: I wrote my c++ console program with vs2008, and everthing is ok. But i open it with vs 2010, the consol window dispear after the code run.I can not see the output resutls in console window. could you please help me out. Regards | |
Hello, This is the program that I need to do: Write a program that will sort an array of 20 integer numbers into descending order. The results must be displayed on the screen in one column. I tried this, me totally confuse. :| I tried to do this program for … | |
I would like to generate output like this common, int, optional video, double, optional by karma with the structure [code] struct attr_struct { std::vector<std::string> name; std::vector<std::string> type; std::vector<std::string> use; }; [/code] So I defined some rules for it [code] #include<iostream> #include<string> #include<vector> #include<boost/fusion/adapted/struct.hpp> #include<boost/spirit/include/karma.hpp> namespace karma = boost::spirit::karma; namespace karma … | |
Can I not do the below code? [CODE] class box { public: box(){} box(int v){x=v;} ~box(){} int getx(){return x;} private: int x; }; ____________________________ #include <iostream> #include <queue> #include <cstdlib> #include <ctime> #include <windows.h> using namespace std; #include "Q4.h" int main() { queue<box> B; int a; cout<<"How many boxes would … | |
I am really confused as to the purpose of the unary + operator. What in the world does it do? I have tested it and it doesn't return the absolute value. Does it just return the operand? And if so what purpose is it?! (I mainly care about integer types) | |
Hi, The program I'm trying to make is to transcribe DNA to RNA and separate into codons. So far I was able to transcribe DNA to RNA and store it in string variable. Next part is to separate RNA strand into groups of 3 (codon) and store each group in … | |
I take some codes from [url]http://boost-spirit.com/home/articles/karma-examples/output-generation-from-a-list-of-key-value-pairs-using-spirit-karma/[/url] But it wouldn't compile My compiler : vc++ 2010 os : win7 64bits [code] #include<iostream> #include<string> #include<boost/optional.hpp> #include<boost/spirit/include/karma.hpp> namespace karma = boost::spirit::karma; namespace phoenix = boost::phoenix; int main() { typedef std::back_insert_iterator<std::string> sink_type; karma::rule<sink_type, std::string()> base = karma::string; typedef std::pair<std::string, boost::optional<std::string> > pair_type; karma::rule<sink_type, pair_type()> … |
The End.