49,761 Topics

Member Avatar for
Member Avatar for babyhuyx

I'm currently working on a project similar to that of text twist. I have a dictionary txt file which I stored into an array. I then have user input a guess, then compare the guess to the dictionary array using a for loop. Somewhere along the lines of this: [CODE]string …

Member Avatar for raptr_dflo
0
171
Member Avatar for smmcfarl

This is my whole program and what I am trying to do. Nothing is being outputted through the functions though. When I output the array in the client code it prints correctly but not through the recursive function. So I am wondering what I am doing incorrectly? Input is like …

Member Avatar for raptr_dflo
0
93
Member Avatar for MrEARTHSHAcKER

Hi, I wish to start making Windows Applications, but I need a good compiler. Considering I work in DEVC++, I can't make buttons, textboxes and other objects that easy. I wonder if there's any compiler like BorlandBuilder for C, but for C++. That'd really help me :icon_cool: So do you …

Member Avatar for MrEARTHSHAcKER
0
216
Member Avatar for cummings15

The void and Output file will not work for my code and I don't know why. [CODE]#include <iostream> #include <string> #include <istream> #include <fstream> #include <cstdlib> #include<iomanip> using namespace std; #define MAX_ENTRIES 50 struct internet { string internetDomain; string ipNumber; int counter; }; // declare the array of structs - …

Member Avatar for raptr_dflo
0
125
Member Avatar for caut_baia

Hi everyone.I'm trying to compile a resource file ".rc" for a Win32 application but i'm getting this error "use "" to put " in a string".Among other things , i'm trying to define a MENUITEM with a string that looks like this "&Save\t\"Alt+S\"".i have tried escaping the '"' character with …

0
149
Member Avatar for akde

I have created a new C++ project (to be able to use the graphics.h library) then I have tried to add a C project which works perfectly in C (by the way I have saved the file with .c extension). 2 line leads to error: [CODE] q = malloc(sizeof(struct QueueRecord)); …

Member Avatar for akde
0
259
Member Avatar for stereomatching

How could we measured the relationship between types and binary files generated by compilers? [code] template<typename T> T Max(T const A, T const B) { return A > B ? A : B; } void testMax() { int a = 5, b = 10; double c = 44.4, d = …

0
46
Member Avatar for learner guy

hi i am a newbie at c++.. this is code of game am wondering why the text is blinking ? [CODE]/ /* Include section */ #define WIN32_LEAN_AND_MEAN #include <iostream> #include <windows.h> #include <cstdlib> #include <time.h> /* Using Statements*/ using std::cout; using std::endl; /* Constants */ #define X 20 #define Y …

Member Avatar for MandrewP
0
341
Member Avatar for james6754

[CODE] USHORT * pInt = new USHORT; *pInt = 10; std::cout << "*pInt: " << *pInt << endl; long * pLong = new long; *pLong = 90000; std::cout << "*pLong: " << *pLong << endl; *pInt = 20; std::cout << "*pInt: " << *pInt << endl; delete pInt; *pInt = …

Member Avatar for Moschops
0
120
Member Avatar for zo0oda

[COLOR="Red"]hello.... I'm new member and I'm so happy that i found daniweb.com to get some help from you my friends.... i need help in solving this problem...[/COLOR] •Select one program of your choice that implements Single or Double Linked List in C++. Make sure you use class in your program, …

Member Avatar for Narue
0
113
Member Avatar for mebrahtom

I tried to run this program and it runs.But when I go and open the file account.txt it says character encoding problem.it is created but doesn't open.help please! thank you in advance. [CODE][/CODE]

Member Avatar for Ancient Dragon
0
65
Member Avatar for stereomatching

compiler : visual c++ 2010 os : win7 64bits [CODE] std::string temp = "temp"; boost::tuple<std::string> A( std::move(temp) ); //this is copy std::tuple<std::string> A( std::move(temp) ); //better, woundn't compile [/CODE] this is inconvenient when I want to do something like this [code] std::tuple<std::string> kkk() { std::string temp = "temp"; return std::make_tuple( …

Member Avatar for stereomatching
0
313
Member Avatar for askerknight

[CODE]#include<iostream> using namespace std; int main() { int x, s, g,; int m[10]; cout<<"Input 10 numbers: "<<endl; cout<<"number: "; for(s=0; s<10; s++) { cin >>g; m[s]=g; } cout<<"\n"; int max, max2; max=max2=0; for(int i=0; i<10; i++) { if(m[i]>max) { max2=max; max=m[i]; } if(m[i]>max2 && m[i]<max) { max2=m[i]; } } int …

Member Avatar for askerknight
0
145
Member Avatar for Jsplinter

[CODE] vector<int> iv; iv.push_back(4); vector<int>::iterator it = iv.begin(); cout << *it; cout << *(iv.begin()); //debug assertion here [/CODE] Why can't I dereference iv.begin() directly?

Member Avatar for Jsplinter
0
279
Member Avatar for C++isC++

I have an assigment that i cant solve it , can any one help ? Here is it : .................... Write a C++ program that calculates the interest for a customer’s money at a bank account. If the customer deposit is 6000 JD or less, the bank gives an interest …

Member Avatar for MandrewP
0
100
Member Avatar for triumphost

Hey all. I'll make this quick. I want to search for a pattern and replace it with an empty string using the boost/curl libraries OR strictly c++.. No DotNet. The below code I have, removes HTML Tags from a file/string: [CODE] static string StripTags(string source) { int iSize = (int)source.length(); …

Member Avatar for vijayan121
0
307
Member Avatar for BoBok2002

I need help. I tried to load an image using SOIL. I was having problems with it so I found another code I am using. However, it looks like I am not loading it properly. It's simple but I think I'm confusing myself. I still can't wrap my head around …

Member Avatar for BoBok2002
0
5K
Member Avatar for Jdan2388

Hi I think im doing fairly good on this program but for some reason its giving me an error on line 27 this program is supposed to compute two statistical values for an array of 500 integers ranging in value from 0 to 2000 what am i doing wrong? [CODE] …

Member Avatar for Lerner
0
251
Member Avatar for mikedee7282

Can someone interpret this code for me? I dont understand whats going on. This code is supposed to take a number n that is inputted and show all the numbers below n that are frugal. A little background, a frugal number is a number where the amount of the digits …

Member Avatar for stereomatching
0
276
Member Avatar for Despairy

as you can see in the picture this happens the second i add to that kamapatchi class 1 more integer. [CODE]#pragma once #include "Configuration.h" class Kamapatchi{ public: Kamapatchi(); Kamapatchi(Point ); Kamapatchi(int,int); int getAge(); bool isAlive(); void drawSprite(char world[][BOARD_SIZE]); void eraseSprite(char world[][BOARD_SIZE]); void act(char world[][BOARD_SIZE]); void updateStatus(); string getStatusString(); string getSpecificMenu(); …

Member Avatar for WaltP
0
196
Member Avatar for toneranger

Hi, I've got stock market data in a structure as follows. [CODE]struct PriceInfo { double Open; double High; double Low; double Close; unsigned int Volume; unsigned int Time; std::string Date; };[/CODE] My program imports the data from a csv file and stores it in memory etc. The date and time …

Member Avatar for WaltP
0
2K
Member Avatar for jmaass20

im a new student to c++ and classes has really confused me. the program is creating a bank account. i have already completed the header file but the implementation file has be confused. can someone please help me with this. thanks! here is my header file: #include <iostream> using namespace …

Member Avatar for Lerner
0
133
Member Avatar for Vasthor

can anyone tell me particular code that work opposite way for "sort", where.... [QUOTE] sort(b, e) Rearranges the elements defined by the range [b, e) into nondecreasing order. Defined in <algorithm>. [/QUOTE] from Accelerated C++

Member Avatar for stereomatching
0
88
Member Avatar for codenoobrebel

Hello all, I am working on an assignment for my OOP1 class that requires reading a .DAT file, performing a bubble sort according to user input using the keyboard and then writing the sorted data to an output.DAT file. I am able to get my program to compile with no …

Member Avatar for Lerner
0
107
Member Avatar for jpico

Hi, I've been trying to write a converter that converts several units. I want it to be able to prompt the user to retype an input if they type an invalid input... I'm struggling with this part. This is what I have so far. [ICODE] #include <iostream> #include <iomanip> #include …

Member Avatar for Red Goose
0
151
Member Avatar for couldxbe

Hi everyone! I know there have been quite a few threads on this topic but I'm having a lot of trouble with one piece of code. Basically, I have an input file with three columns and 500+ rows. I want to find the average of each column, and then subtract …

Member Avatar for couldxbe
0
130
Member Avatar for ktsangop

Hello everyone! I want to add a licence expiration feature in my application (written in visual c++). When the licence expires i would like my application to generate a random numerical key which will be sent to me by the user. Using this key and a personal key-generator i would …

Member Avatar for ktsangop
1
2K
Member Avatar for mankamat
Member Avatar for nchy13

i don't know why but my compiler reads only upto insert statement. this is what compiler looks like: [B]nchy@ubuntu:~/Desktop$ g++ tree.cpp nchy@ubuntu:~/Desktop$ ./a.out 2 insert 0 14 10 85 15 70 20 60 30 50 65 80 90 40 5 55[/B] [COLOR="Red"]i want to implement following input format[/COLOR] 2 insert …

Member Avatar for jmichae3
0
117
Member Avatar for squall730

I have a homework assignment where I'm supposed to use pass by references. I'm reading my text and don't really get it. The assignment is to create a program that converts Fahrenheit to Celsius and vise versa. It's also supposed to contain a print function that will output the results …

Member Avatar for selina12
0
325

The End.