49,761 Topics
| |
[ICODE]void doublyLL::addFront(int x) { node * somenode = new node(x); if( head != NULL) head->prev = somenode; somenode->next = head; head = somenode; } void doublyLL::addBack(int x) { } [/ICODE] | |
The practical exercise for this session will be to create a cash register program that you input the cost of an item, the number purchased and if a sales tax applies to the item. If a tax does apply to the item, the tax value will be ten percent of … | |
I am trying to make a reference program that you can use to access any element of the periodic table based on its name, symbol, atomic number, or atomic mass. It is more than one file, and I need a way to return to main if the user wants to. … | |
Okay, I've just started learning C++ and I'm on the third chapter of my book which deals with control statements. Basically, I've learned how to create very basic text based games. [CODE] #include <iostream> #include <string> int main (void) { using std::cout; using std::cin; using std::string; string options = ""; … | |
I need to write a program that tells the user to input one fraction(numerator and denominator), along with two other fractions that are given. The program must +,-,/,*,reduce,reciprocate, and find if the given fractions are greater less than or equal to one another. I have no clue of even where … | |
can you help me to fix my program? how can i non-repeat the numbers i don't know the code..and how can i generate a numbers for bingo?...i need to generate until i win.. [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; const int ROWS = 5; const int COLUMNS … | |
I've been trying to make something where I can just plug-in a new implementation (for things like opening a window, displaying graphics, etc.) and it work just like before. I've added a couple of other things like a resource manager, but now I'm getting linker errors. This didn't happen until … | |
Hey guys, I'm wondering if you can help me out on my problem. I wrote this code to print out consecutive numbers till it reach the maximum number entered. The code works but I want to control the output. Here's my code so far... [CODE] cout << "Enter max number: … | |
I am new to C++ and would like to know the best way to setup a 2D game engine. All of the graphic files that I am using for this game are in .png format. How do I use SDL with my game engine, and where do I start when … | |
I cannot figure out what I'm doing wrong in the following code: [CODE]char* charArray[3]; strcpy(charArray[0],"wn"); strcpy(charArray[1],"chair"); strcpy(charArray[2],"-over");[/CODE] Thanks a lot for the help! | |
[ATTACH=RIGHT]17677[/ATTACH]Here at DaniWeb, we've talked a lot about [URL="http://www.daniweb.com/reviews/review313227.html"]Intel Parallel Studio[/URL]. I recently had the chance to sit down with Intel's James Reinders, and find out more about his take on [URL="http://software.intel.com/en-us/intel-parallel-studio-home/"]Parallel Studio 2011[/URL]. Mr. Reinders (pronounced Rhine-ders) is a senior engineer at Intel and has been with the company … | |
I was wondering about the new [URL="http://software.intel.com/en-us/intel-parallel-studio-home/"]Intel parallel studio[/URL], can anyone share their personal experience with it? Likes, dislikes, cool projects, etc? Our own [URL="http://www.daniweb.com/reviews/review313227.html"]Jeff Cogswell reviewed it here[/URL], but i want to here from a few others... | |
pleas will any one help me i feel im going to explode more than 8 hours in this question and i have to submit it after 3hours.. my prog is not finished yet but an error saying unresolved external sympol... actually i have aprog that define the mistake(MSDN library for … | |
hello guys....lets suppose I have two projects. Now I want to integrate them using visual studio 200X, how can I do that? thnx | |
What the title says. Basically, I have some code with 12 nested loops based on the code below, and may have to bump it up to 24. This works fine, but seems a little cumbersome, and can't help but think that there's a better way of doing it? All help … | |
My program passes a parameter that looks like this: [CODE]std::vector<myDataType> vec; void function(&vec);[/CODE] Then the function accepts the argument like this: [code]void function(std::vector<myDataType>* myVec){ ...does something }[/code] Yet somehow I am getting the following error: error C2664: 'CMyClass::WriteVectorSTL_CSV' : cannot convert parameter 1 from 'std::vector<_Ty> *__w64 ' to 'std::vector<_Ty> *' … | |
How to remove first few bytes in files concept in qt3 designer | |
Hi guys, need some help in writing a progrom to test my code. Currently, what i have written for the header file is this [CODE] #ifndef _VENDMACHINE_H_ #define _VENDMACHINE_H_ #include <string> class VendMachine { private: string item; int numberOfItems; int cost; public: VendMachine(string s, int = 50, int = 50); … | |
I saw this code in a textbook and I tried to put in my eclipse IDE, but it didn't work: [CODE] #include "GradeBook.h" #include <iostream> using namespace std; // GradeBook class definition class GradeBook { public: // function that displays a welcome message to the GradeBook user void displayMessage() { … | |
Hello everybody, I am new here in this community and I hope to learn a lot from you guys and then maybe later become the one to give out advices. I am also new to programing and I recently started learning C++. I am doing a program that is supposed … | |
I need to convert array of char to hex one char at a time , I tried to use sprintf,but it did not work. ? | |
Hello, I have to make a program using heapsort, and am having trouble getting it. I think the problem is with either fixup() or buildheap(). I am having trouble understanding the syntax for both of those methods, the teacher gave us the code for them, but I am having trouble … | |
I'm really frustrated right now because I've been looking all over the web on how to set up OpenGL to work with Microsoft Visual C++, but it seems like each website I find wants me to do something different. I feel like I'm missing something here...like I'm overcomplicating it. I … | |
I'm working on a program in C++ that is supposed to output som data from a couple of classes. I thought I'd let the user choose what to output (what function) through a switch in main. This is basicly how the main looks now. (Just a general overview of the … | |
Hi, I am new to C++, for my home work for intro to C++, well it would be easier if I just copy and paste the assignment. [I]In this program, you will continuously track the minimum and maximum values of a file of integers as the file is read. Your … | |
Hi, have tryed and everything below gives me 0 [CODE=c++] sizeof(array) / sizeof(*array); sizeof(array) / sizeof(array[0]); sizeof(array) / sizeof(array data type); //even the thing which i do not understant: template< typename T, std::size_t N > inline std::size_t size( T(&)[N] ) { return N ; } [/CODE] I need to get … | |
Hey guys, quick question: I have been experementing with the _popen() function to get the stdout from programs. I'm trying to wrap it in a function for quick reuse, but the prog crashes every time! Here is the function (as well as the quick test main() function): [CODE] // crt_popen.c … | |
hi i have a program..i can't explain this code..can you explain this??... int card[ROWS][COLUMNS] = {{rand() % 15 + 1, rand() % 15 + 16, rand() % 15 + 31, rand() % 15 + 46, rand() % 15 + 61}, {rand() % 15 + 1, rand() % 15 + 16, … | |
Sorry for the bad title, but I'm not even sure what I'm trying to do is called. I have about 10 lines of code to clear a screen and reprint only certain images back to erase clutter. The thing is, I'm just simply tiered of writing these ten lines over … | |
I cant round up minutes and switch them to hours?...for example if a car was parked for 241 minutes(input has to be in minutes) and rate was $2/hour and first 120 minutes were free i would need to charge for 5h and i dont know how to round up right … |
The End.