51,593 Topics

Member Avatar for
Member Avatar for Labdabeta

Hello, I am making a number of libraries to help me with my projects and I am torn between two approaches. I will show you what each looks like. I have no idea which would be considered 'better' in general. Locals: #ifndef SOME_GUARD #define SOME_GUARD VERSION_NUMBER #ifdef __cplusplus extern "C" …

Member Avatar for mike_2000_17
0
227
Member Avatar for gobiking

Hello, I have been trying to figure out how to make an array work with a calculator that uses up to 100 different inputs to calculate sum, difference, standard deviation min max etc. When I try to compile the code I get (error: no match for 'operator<<' on line 64 …

Member Avatar for gobiking
0
3K
Member Avatar for elattar

I need to make program that calculate multiplication of matrice i made it in main now i need to make it in functions would anybody hepl me with my problem that is my code #include <iostream> using namespace std; #include <cstdlib> void fn(int **arr) { } void fn2 (int **arr2){ …

Member Avatar for elattar
0
175
Member Avatar for nomorelogic

i would like to have the ability to tell the player they cannot go that way if the exit does not exist the rooms are in a text file that is read in, i know i should use a if function but dont know where to put it, any help …

Member Avatar for spuriousgeek
0
282
Member Avatar for kortneycoles

Hello all! I'm new to the forum and need some help. I finished most of the code already but I am stuck now. I'm trying to create a program that shows the interst and payment on a loan. I want to add som code that will sum the amount of …

Member Avatar for kortneycoles
0
179
Member Avatar for robert.speciale

I have a void function that takes data from an ifstream, reads the first value, (which is an ID #), and compares that value against the ID# info from an array of records. If it's invalid, the rest of the line is ignored. If it's valid, it adds the hours …

Member Avatar for robert.speciale
0
239
Member Avatar for hammy2013

The full structure of a C++ program to compare two strings and check whether they are equal

Member Avatar for ddanbe
-1
126
Member Avatar for ha1206570

Hi every one i have project and i need your help !! this is the project you can look http://store2.up-00.com/Apr13/Ddd93410.png http://store2.up-00.com/Apr13/9HA93410.png

Member Avatar for Ancient Dragon
0
175
Member Avatar for SpottyBlue

Can someone help me with this? This is part of my first assignment. I am quite new to programming. > A company wants to transmit data over the telephone, but they are concerned that their phones are tapped. All of their data are transmitted as four-digit integers. They wanted you …

Member Avatar for Moschops
0
505
Member Avatar for Hayati_mahamad

**how can i create a program that provides 3 types of data structures: linked list, stack and queue.which my program will provide a menu that a user can choose whether to use a linked list, stack or queue.** Example of output: Main Menu 1. Linked list 2. Stack 3. Queue …

Member Avatar for Hayati_mahamad
0
219
Member Avatar for dmikawa

Need help writing a program for class. Here were the posted instructions: Step 1: The program should have a FUNCTION that displays a screen that shows which seats are available and which are taken. Seats that are taken should be represented by a # symbol and seats that are available …

Member Avatar for tinstaafl
0
688
Member Avatar for Haquo

Hello Everybody, I’m currently working on my end of year project and I got stuck on a very trivial thing. When I’m trying to add a new user to a database (local) I keep getting “Syntax error in INSERT INTO statement" I don’t really see where is the problem so …

Member Avatar for Haquo
0
1K
Member Avatar for sihled1

Please kindly help. the login iv already managed to code need help with this part. Upon execution of your program, it should first read the user-ids and passwords from a file and create a binary search tree using the user-id as a key (assume unique user-ids for convenience). Once the …

Member Avatar for Schol-R-LEA
0
182
Member Avatar for wolframP

hello altogether, my name is Wolfram Pagels, Berlin, Germany my status is :retired but enthusiastic c++-fan; I use Dev-C++ since 3 month ago; in the 70th I programmed in Fortran; after a long break I enjoy to learn c++11; e.g.: the day before yesterday I got the following message from …

Member Avatar for Ancient Dragon
0
7K
Member Avatar for omarking05

Hey .. im doing a game project with sfml and i countered a small problem ,here is my code : #include <SFML/Graphics.hpp> #include <string> #include <iostream> using namespace std; using namespace sf; int main () { sf::RenderWindow Window; Window.create(sf::VideoMode(490, 485),"My First Sfml Game"); sf::Texture pTexture1; sf::Sprite playerImage; if(!pTexture1.loadFromFile("Data/dots.png")) std::cout<<"error could …

Member Avatar for Ancient Dragon
0
258
Member Avatar for kamalashraf
Member Avatar for Captain119
0
192
Member Avatar for Ancient Dragon

I have a copy I no longer want -- if anyone wants it just pay shipping and I'll give it to you. It's in the original box and includes a cd that contains service pack 5.

Member Avatar for Ancient Dragon
0
193
Member Avatar for sparkling eyes

Hi...I have to bulit code for a parser in c++ which takes a simple txt file in which there are two functions 1 is for addtion of two numbers and 2nd is for printing of result. Parser have to open the file read it line by line and then tell …

Member Avatar for ddanbe
0
153
Member Avatar for maHvic

thanks for helping me... im using c++ language... how can you convert decimal to binary.. should i divide it? can you give me a hint for what code should i use...thanks

Member Avatar for AndrisP
0
1K
Member Avatar for johans22

given struct s={int A; int B}; what is most logical and fastest way to find the B element given A in this array or vice versa?. s table1[]={{1,2},{3,4},{5,6},..};

Member Avatar for johans22
0
153
Member Avatar for noor.beetna

I want to write a program in c++ language to define a class Bank_Account with the following members: Data member: - Accoount_no. - owner. - Balance. Member fenctions: - To assing intial values. - To deposit an amount. - To withdraw an amount after checking the balance. - To display …

Member Avatar for zain.imtiaz
0
136
Member Avatar for aan_rwh

how to create animated figures 0 runs from the top left corner to the upper right corner and back again from the top right corner to the upper left in a row

Member Avatar for icmmovers
0
109
Member Avatar for kubawpl

My friend didn't want to post this himself so I'm doing it for him. The creatures.size() returns wrong value! I don't know why i push back only two objects and sometimes its returns things like -89252... I'm using Mingw-g++ 4.7.2 . I tested it also on my linux and the …

Member Avatar for ravenous
0
151
Member Avatar for chrispitt
Member Avatar for ravenous
0
115
Member Avatar for waqas.zafar.125

hey guys ! i am new to graphics in c++ .. i have to develop an application called " paint " . i have to implement it using classes ( and inheritance in classes ) . For example i have to draw a line using mouse . All the graphic …

Member Avatar for rubberman
0
221
Member Avatar for alxanderajon

write a program that accept 3 numbers.print the smallest and largest number. how we write it by nested if condition?

Member Avatar for rubberman
0
95
Member Avatar for Chicktopus

Hi guys I'm trying to use WndProc as a member function, but no matter what I do, I always get a null handle. One thing I'm uncertain of is that when my StaticWndProc is called, the p_hWnd is null. Is that correct? Once it leaves the function it remains null …

0
75
Member Avatar for SirMahlon

#include <iostream> #include <ctime> #include <cstdlib> #include <iostream> using namespace std; For all 6-digit numbers from 100000 to 999999, find the numbers that, if you add the top three digits to the bottom three digits, and square the result, it will equal the original number. For example, for 123456, you’d …

Member Avatar for SirMahlon
0
202
Member Avatar for Yustme

Hi everybody, I'm new in programming. Getting started with C. Im trying to do a few easy things like to uppercase a string. But i got stuck... This is what i have so far: [code] void toupper( char *text ) { char c[] = "testING"; } [/code] And im not …

Member Avatar for brcsur
0
9K
Member Avatar for wschamps42

I have a few code snippets from a tutorial Im reading my friend gave me to learn c++, and a lot of it is written in shorthand but I cannot fully understand the shorthand code. return c < Cnt ? &foo[c]:NULL;; this: return (cc > 0 && cc <= mCnt)?&foo[cc-1]:NULL; …

Member Avatar for wschamps42
0
177
Member Avatar for kyle.mace.35

can someone please help for me to change this function to iterative? int recursive(int n) { int total = 0; if(n>=3) return recursive(n-1) + 2*recursive(n-2) + 2*recursive(n-3); else if(n>=2) return total + recursive(n-1) + 2*recursive(n-2); else return total+1; }

Member Avatar for tinstaafl
0
121
Member Avatar for jose.a.rueda.5

hi! i have a program in C++ that produces a right triangle of character and i need the same program, i mean a program that makes the same function, but in C. This is my program in C++ : #include <iostream> using namespace std; int main() { int i,j; char …

Member Avatar for mridul.ahuja
0
233
Member Avatar for MRehanQadri

#include <iostream> #include <fstream> using namespace std; class a{ public: void set(int x){num = x;} int get(){return num;} private: int num; }; int main(){ ofstream o_("test.txt"); o_.close(); ofstream os("test.txt", ios::binary | **ios::app**); a o; o.set(1); os.write(reinterpret_cast<char*>(&o), sizeof(a) ); // a o2; // o.set(2); // os.write(reinterpret_cast<char*>(&o), sizeof(a) ); os.close(); a o3,o4; …

Member Avatar for MRehanQadri
0
2K
Member Avatar for teo236

I am writting a simple C++ programm and I want to generate outputs to the console but with the functions 'fwrite' and 'printf'. However, I can't print special characters like 'á', 'é', ... Here is a simple code: printf("Special character: 'ñ'"); Were the output was `±` I found that those …

Member Avatar for tinstaafl
0
362
Member Avatar for lewashby

In the following program I'M trying to take a number no more than 12 digits long and make it a factor of 3. If the input is 1, the program would turn the number into 001. If the input is 12, the program would turn the number into 012. If …

Member Avatar for tinstaafl
0
122
Member Avatar for gobiking

Hello, I have been messing around and writing more and more intricate calculator programs on MVE C++. The issue I am having right now is my program is not running unless I give my add, sub, etc. a value. When I try to just leave them as int add; or …

Member Avatar for gobiking
0
226
Member Avatar for gobiking

Hello, I am new to C++ and I was trying to write a simple calculator program that has a do-while loop and also includes a series of != statements. Even though I make the statements with all the appropriate keystrokes it keeps giving me my invalid sign statement. Also, I …

Member Avatar for Labdabeta
0
296
Member Avatar for MRehanQadri

Kindly Remove its errors and tell me the reason for the error. Code: https://www.box.com/s/enl4h6loqcnc7jqqgujq

Member Avatar for MRehanQadri
0
188
Member Avatar for Shahrukh017

How a designer of a class can ensure that no one outside the class can make a copy of the objects of their class?

Member Avatar for Moschops
0
113
Member Avatar for eig132062

#include <string> #include <ctime> #include <fstream> #include <iostream> #include <cstdlib> #include <cmath> #include <iomanip> using namespace std; `static unsigned int Q[41790],indx=41790,carry=362436,xcng=1236789,xs=521288629; unsigned int refill()// refill f(n) for SuperKISS { int i; unsigned long long t; for (i=0;i<41790;i++) { t = 7010176ULL * Q[i] + carry; carry = (t>>32); Q[i] = …

Member Avatar for Ancient Dragon
0
208
Member Avatar for invisal

1. For developing productive software 2. For learning (learning C++ language, implementing algorithms and data structures) or solving fun programming problem. 3. I don't use it ___________________________________________________________________________ **NOTE** I haven't been in Daniweb for years and there are so many changes that I don't even know how to create a …

Member Avatar for asrockw7
2
267
Member Avatar for krishnisilva

Hi , I am using C# to do my projects and I have connected to a MS SQL database file and I am using MS visual studio 2008 standard edition. I need to get all the users first name and the last name and display in a combo box when …

Member Avatar for curos
0
2K
Member Avatar for adrian.luna.7311
Member Avatar for adrian.luna.7311
0
51
Member Avatar for Musa_Jutt

please help me out, i want a code of algo by i can find out the solution, i know hoe to multiply 2x2 or 3x3 matrices but i want user friendly code in which user can chose option. help me please its in my project.

Member Avatar for DavidB
0
334
Member Avatar for MasterHacker110

I have this code but I only eccepts one client at a time: #include <iostream> #include <conio.h> #include <winsock2.h> #include <string> using namespace std; int main() { WSADATA wsadat; WORD rVersion; rVersion = MAKEWORD(2,0); if(WSAStartup(rVersion, &wsadat) != NO_ERROR) { cout<<"WSA initialization failed.\n"; WSACleanup(); return 1; } //Creating the welcome socket …

Member Avatar for rubberman
0
4K
Member Avatar for Etniespr101

Hey guys, I am incredibly new to c++ and need a little help on a matrix multiplyer program... [code] #include <iomanip> #include <iostream> using namespace std; int main() { int **mat1; int **mat2; int **result; int row,col; cout<<"Please enter row/col"<<endl; cin>>row>>col; mat1 = new int *[row]; mat2 = new int …

Member Avatar for Musa_Jutt
-1
625
Member Avatar for Labdabeta

Hello. I have been looking long and hard for an image library that meets these criteria that I have for pretty much any library I will use (with some obvious exceptions): A) Cross-Platform (If at all possible) B) Weightless (or nearly weightless) C) Stand-alone (I hate having to include DLLs …

Member Avatar for Labdabeta
0
239
Member Avatar for mag.magnesia

THIS IS THE QUESTION. 1- The user would enter how many minutes he/she would like to park in the parking lot. 2- The program would output the parking cost. 3 - The rate charge by the parking lot is as follows First 3 hours - RM4/Hour Hours 9 onwards - …

Member Avatar for deceptikon
0
235
Member Avatar for MRehanQadri

[code]#include <iostream> #include <fstream> #include <conio.h> #include <ctime> using namespace std; //////////////////////////////////////////////////////////////////////////////// class account{ public: account(){ i = 0; balance = 0; transaction_during_one_day = 0; one_month_balance = 0; minimumBalance = 99999999999999; startTime = clock(); } //```````````````````````````````````````````````````````````````````````````````````````````````` void depositBalance(){ cout << "Enter Amount to Deposit: "; cin >> depositAmount; balance += …

Member Avatar for MRehanQadri
0
86
Member Avatar for jamegh1990

Hello. After reading other threads that inut from a text file to a basic array I do not understand how to apply it to a 2d array. I dont quite understand what I need to do to make it read in the data properly. This is what I have so …

Member Avatar for jamegh1990
0
338

The End.