49,761 Topics

Member Avatar for
Member Avatar for KazenoZ

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 …

Member Avatar for thines01
0
90
Member Avatar for Goshutu

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

Member Avatar for Goshutu
0
345
Member Avatar for MishMash95

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 …

Member Avatar for pinsickle
0
80
Member Avatar for pseudorandom21

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 …

Member Avatar for pseudorandom21
0
150
Member Avatar for tsudeily

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

Member Avatar for thines01
0
225
Member Avatar for jackmaverick1

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 …

Member Avatar for jackmaverick1
0
142
Member Avatar for smurfy

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 …

Member Avatar for nina@cika
0
348
Member Avatar for learner guy

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 …

Member Avatar for Schol-R-LEA
0
235
Member Avatar for namratag
Member Avatar for MasterHacker110

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

Member Avatar for MasterHacker110
0
89
Member Avatar for Vasthor

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 …

Member Avatar for Vasthor
0
244
Member Avatar for acmarshall

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 …

Member Avatar for acmarshall
0
313
Member Avatar for dinamit3

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

Member Avatar for Schol-R-LEA
0
213
Member Avatar for LevyDee

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 …

Member Avatar for mrnutty
0
108
Member Avatar for jankeifer

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

Member Avatar for cahitburak
0
138
Member Avatar for qmanchoo

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 …

Member Avatar for Moschops
0
113
Member Avatar for Gregor007

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 …

Member Avatar for WaltP
0
158
Member Avatar for EvaL2ne

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 …

Member Avatar for WaltP
0
316
Member Avatar for khanthegamer

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

Member Avatar for khanthegamer
0
151
Member Avatar for snowhite89

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 …

Member Avatar for Moschops
0
263
Member Avatar for stereomatching

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

Member Avatar for stereomatching
0
325
Member Avatar for jeevsmyd

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?

Member Avatar for jeevsmyd
0
70
Member Avatar for jeevsmyd

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 …

Member Avatar for Schol-R-LEA
0
547
Member Avatar for ztdep

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

Member Avatar for Ancient Dragon
0
45
Member Avatar for Tahmod

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 …

Member Avatar for Schol-R-LEA
-1
270
Member Avatar for stereomatching

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 …

Member Avatar for stereomatching
0
121
Member Avatar for Hiiero

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 …

Member Avatar for jmichae3
0
171
Member Avatar for Labdabeta

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)

Member Avatar for mrnutty
0
299
Member Avatar for sangkun

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 …

Member Avatar for vijayan121
0
1K
Member Avatar for stereomatching

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

Member Avatar for stereomatching
0
285

The End.