49,757 Topics

Member Avatar for
Member Avatar for Tahira_1
Member Avatar for Nether_1

Since OpenGL uses the strange system of 1s and 0s to represent location on the screen, I'm trying to figure out how to switch it to standard x, y coordinates like those that are used on a graph. And so far, my searches on the rest of the internet have …

Member Avatar for rproffitt
0
545
Member Avatar for Name_1

So I'm trying to convert my code into 3 files, the main.cpp, a header, and the classbody.cpp. This was my original code: #include <iostream> using namespace std; #include <string> #include <ctime> #include <stdio.h> #include <stdlib.h> class colorPicker { private: string colorArray[7]; public: colorPicker() { colorArray[0] = "Red"; colorArray[1] = "Green"; …

Member Avatar for rubberman
0
278
Member Avatar for Arbus

Hello all, I need your help. I trying to change the font of texts displayed in the output of my program. I know that we can use settextstyle() for changing fonts. But there are only four types of fonts( GOTHIC, SANS SERIFF , TRIPLEX , DEFAULT) available. I want to …

Member Avatar for afv
0
4K
Member Avatar for qqwushi12345

Write the C program that solve the quadratic equation problem The output should appear as follows: Enter A: 3 Enter B: 5 Enter C: 2 There are two solutions: -0.666667 and -1. Press any key to continue_ thank you,

Member Avatar for mohanned_2
0
4K
Member Avatar for can-mohan

I am parsing below sample file in below code snippet. {"requestType":"INVOCATION", "hostName":"localhost", "serviceName":"bucky", "serviceType":"DISCRETE", "serviceParameters":"sampleData", "servicesList" :[ { "serviceName" : "ABC", "serviceParameters" : {"para1" : "value1", "para2" : "value2", "para3" : "value3"} }, {"serviceName" : "CBA", "serviceParameters" : { "para1" : "value90", "para2" : "value", "para3" : "value"} } ], …

Member Avatar for can-mohan
0
5K
Member Avatar for itian.kongu

Hi all few free tutorial sites for beginners are given below. C PROGRAMMING http://learnermode.com/c-tutorial/ C++ pROGRAMMING http://cplusplus.com Java https://docs.oracle.com/javase/tutorial/ C# https://msdn.microsoft.com/en-us/library/aa288436(v=vs.71).aspx Python https://www.tutorialspoint.com/python/ Java Applets http://learnermode.com/java-tutorial/applets/

Member Avatar for cahendi
2
387
Member Avatar for rugae

I'm not quite sure the difference between strcmp and == operator when comparing 2 different strings, I was told to do this but == works as well with less typing. [code=C++] if ((strcmp (a, b[i]) == 0)) { someMethod(); } else someOtherMethod(); _______________________________ if (a==b)) { someMethod(); } else someOtherMethod();[/code] …

Member Avatar for Nikolay_2
0
4K
Member Avatar for kenyo_070289

a program wherein you input a 8 character string..and then validate if its a valid identifier..a valid identifier is a string that starts with an alphabet and underscore(_)..invalid identifier starts with a number and a double underscore(__)

Member Avatar for ZaiBo
0
315
Member Avatar for Dakotah

Hello everyone, I'm working on a card trick program that essentially has the user pick a card and the program will figure out which card it is. However, When I get the the displayed cards, I get some results that have no value and some that are not alligned properly. …

Member Avatar for rproffitt
0
624
Member Avatar for paruse

I'm a beginner in C++. I saw \b and \r in a program source code. I've seen \n and I know its purpose. But why do we use \r and \b in C++? Please clear my doubt. Thank You.

Member Avatar for Shafiq_1
0
38K
Member Avatar for montjoile

hi there, I'm coding in windows, c++, but when I traslate my code to ubuntu, g++, I get this error: [B]lvalue required as left operand of assigment[/B] This is the line where I get the error: [COLOR="Red"][/COLOR][CODE]&*raiz=&*p;[/CODE] What could be the problem? *raiz and *p are pointers to an avl …

Member Avatar for Tushar_4
0
2K
Member Avatar for Khushali_1

The purpose of the program is to store values in array from a file salesData.txt which contains the values as shown below. The program should stop at the sentinel value that is 0.0. The code is not working as expected. . This is the question. Create a program that reads …

Member Avatar for rproffitt
0
349
Member Avatar for anukavi

Hi, Currently writing a NFC program (Windows 7-->VC++ MFC ). The reader is connected via USB and when i run the exe, i manually select and connect the reader for the exe to work. my requirement is 1. In the code, identify the wireless network and if my particular reader …

Member Avatar for Sahar_3
-1
1K
Member Avatar for Alexandre_2

Hello, I was wondering if it was possible to create a software like visual studio (in addition simple, obviously). We could program in vb.net, c ++, etc.

Member Avatar for Reverend Jim
1
545
Member Avatar for Nikhar

Hi everyone, This might be a very stupid question to ask and the answer might be very simple but I was just curious to know this. How to display "\n" on output screen in C++? We all know \n is used to enter a new line. But what if I …

Member Avatar for rubberman
0
2K
Member Avatar for can-mohan

In below code while compiling i am getting error , Error : main.cpp:8:57: error: expected type-specifier before ‘Staircase’ std::unique_ptr algodiagnostic (new Staircase()); compilation command g++ HardwareDiagnostic.cpp HardwareDiagnostic.h main.cpp -std=c++0x -o res it works fine if compile entire code in single file without creating header file and main.cpp separately. Can anybody …

Member Avatar for Coller
0
7K
Member Avatar for Tom_23

i wrote a code that will asks the user to enter a sentence and store the string in a dynamic array. copy the content of the old dynamic array into the new dynamic array and the while loop keeps going and asks the user to enter something new again and …

Member Avatar for Coller
0
3K
Member Avatar for Faez_1

#include<iostream> using namespace std; main() { int numGame,numSocks,numShoes; int countX = 1,countY = 0; float tempGame = 0,tempSocks = 0,tempShoes = 0,GrandTotal = 0; float totalP,priceGame,priceSocks,priceShoes; cout<<"Welcome to Numbani Bowling Arena Transaction System.\n"; cout<<"Please fill in the required sections below.\n"; cout<<"---------------------------------------------------------\n"; while( countX > -1 ) { countY = countY …

Member Avatar for thines01
0
217
Member Avatar for William Hemsworth

Hi all, I'm a very early user of Daniweb, and after a long break, and I'm hoping to participate a bit more in this forum again. I'm here specifically for some advice before starting a new project of mine. I'm an experienced C++ / Win32 developer, but seem to be …

Member Avatar for rproffitt
0
427
Member Avatar for honelign

guys please help me i have an assignment to register students in c++ with the following first name middle name last name id sex age year section the id have to be sorted include chapters interactive with user thanks!

Member Avatar for ddanbe
-1
121
Member Avatar for chris ig

I have been trying to compile this code but all my attempts failed, can someone please explain to me what's the meaning of randvar in this code: int upper_range = 255; for(int i=0; i<256; i++){ upper_range -= i; int delete_list_entry(temp_head, randvar); }

Member Avatar for deceptikon
0
149
Member Avatar for Seth_3

Using function write a program to take two arrays of integer numbers and multiply each corresponding values and put the result in a third array.

Member Avatar for rproffitt
0
72
Member Avatar for benbee

This program should calcuLate users amount of watts consumed based on their appliances and the aprroximate number of hours each appliance is used in a day, week or month. The basic requirements are as follows: Give user option of selecting predefined home appliances or entering their own and corresponding watts …

Member Avatar for luff
0
766
Member Avatar for Good Bye

Hey, I just started learning C++ a couple of days ago and I'm interested in making an automated bot for an MMORPG ie. Runescape, MU Online, Silkroad Online, Last Chaos etc. It would be for personal/private use, so only I would use it. I was wondering, is there a quick …

Member Avatar for Nihat_1
0
3K
Member Avatar for STEPHANO_1

write the program in c++ to define a class called toString with the following data member, class variable str1 and str2 member function get string, compare string, and concatenate String

Member Avatar for rubberman
0
420
Member Avatar for Mohamed_88

Dear All, I need your asistance. I need to develop an application that takes input from text box into an array and calculcate the values (using Visual c++ GUI development). I really need yoru help. Thanks

Member Avatar for thines01
0
802
Member Avatar for Devon_4

void change(char* input){ memset(input, 'a', strlen(input)); } int main(){ char* p = "foo"; cout << p << endl; change(p); cout << p << endl; }

Member Avatar for deceptikon
0
157
Member Avatar for Ehsanullah_1
Member Avatar for Mohammad_33
Member Avatar for rproffitt
0
87

The End.