49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 - … | |
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 … | |
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)); … | |
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 = … | |
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 … | |
[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 = … | |
[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, … | |
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] | |
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( … | |
[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 … | |
[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? | |
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 … | |
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(); … | |
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 … | |
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] … | |
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 … | |
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(); … | |
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 … | |
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 … | |
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++ | |
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 … | |
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 … | |
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 … | |
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 … | |
Hi, How do we read and write a byte array to a XML file in C++. | |
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 … | |
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 … |
The End.