49,757 Topics
| |
Sorry to post this here How do I write a query to double the `buyprice` of every item that costs less than 20US. Can someone help me with this please. I had UPDATE Account SET buyprice This is where i got stuck been searching google but couldnt find it | |
[CODE]#include<iostream> using namespace std; int main() { int num,factorial(int n) ; cout<<"Enter a number "<<endl; cin>>num; } for(n=0;n<100;n++) { cout<<""<<n<<endl; system("pause"); }[/CODE] where i do wrongly? why i cannot compile? | |
i made a program in dev c++ to merge contents of two files into a single file but the merged file is showing garbage outputs. question:- Write a C++ program to merge the content of two files namely “Employee.txt” and “Salary.txt” into “EmployeeDetails.txt”. Sample contents of Employee.txt EmployeeName EmployeeNumber Department … | |
So, it sorts the books by price just fine, but I cannot get it to sort the books by title. I am most likely over thinking this, but I've spent a couple hours trying to figure it out. I've looked online and couldn't find the answer. I'm guessing the problem … | |
Hello all, I am trying to write the constructor for the HashTable class, so it will create an array when a HashTable object is created. With the code below, I am getting the errors: error C2466: cannot allocate an array of constant size 0 error C2133: 'arrayTest' : unknown size … | |
very dificult oop, exception, inheritance task pleas. sorry, i'm hope you understand me. | |
[code]#include<stdio.h> #include<stdlib.h> main() { float num,a,b,c,d,e,f; do { scanf("%f",&num); getchar(); } while (num>=0.75); a=0.0; b=0.0; c=0.0; d=0.0; e=0.0; f=0.0; if (num%2.0!==0) { a=num/2.0; num=num%2.0; if (num%1.0!=0) { b=num/1.0; num=num%1.0; if (num%0.50!==0) { c=num/0.50; num=num%0.50; if (num%0.20!==0) { d=num/0.20; num=num%0.20; if (num%0.10!==0) { e=num/0.10; num=num%0.10; if (num%0.05!==0) { f=num/0.05; } } … | |
I'm trying to sort an array of numbers in ascending order and don't know whats wrong with my code (I'm completely new to vectors). I should first copy the input array (data) into an STL vector, then apply STL’s sorting algorithm to the vector, and finally copy the vector back … | |
Hi can u help me to listing number of file systems that have sizes between 1k to 10k and 10k to 100k ... in c++? I need it soon Thanks alot | |
Hello all, Lots of code here, but much of it can be ignored. I am getting an error on line 34 of HashTable.h, stemming from line 50 of main.cpp. I am trying to create an array of lists in the HashTable.h file. Error code is: \HashTable.h(34) : error C2440: '=' … | |
I'm trying to determine if this creates an array of pointers, with the array size being "size"? Is this correct? [CODE] int size = x; int *ptr; ptr = new int [size]; [/CODE] | |
Studying modern c++ design, looks like Typelist is a very important tool for generic programming. Could I find something like Typelist from boost? I found something like boost::mpl but I didn't see anything like Nulltype defined in loki Could boost::mpl replace the Typelist of loki? Thanks | |
I don't my deduction of NoDuplicates are correct or not please correct my error if I did [code] template<typename TList> struct NoDuplicates; template<> struct NoDuplicates<NullType> { typedef NullType Result; }; template<typename Head, typename Tail> struct NoDuplicates<Typelist<Head, Tail> > { //private : typedef typename NoDuplicates<Tail>::Result L1; typedef typename Erase<L1, Head>::Result L2; … | |
Hello (Dunno if this is the right forum) But basically, I've been given some text to decrypt. I've got to do it using frequency analysis. Here's what I've done: 1. Got a frequency analysis of the text: Showing how many times a letter appears. 2. Got a frequency analysis of … | |
i have follwoing code in c++ .i want to continue it till suer give input as 'Y' or 'y' [CODE]// my first program in C++ #include <iostream> #include <stdlib.h> #include <conio.h> #include <stdio.h> //#inlcude <iostream> #include <stdlib.h> #include <conio.h> #include <ctime> using namespace std; void Evaluatexp(char ch[]); //void Evaluatexp(string ch); … | |
I have function which I have created a DLL for. I'm trying to call this function from a C++ program using some code I found online. I know the code works fine when the function in the DLL uses the convention call [ICODE]__stdcall[/ICODE], however, I don't want to use this … | |
Hello, I need to take a four digit integer and re-arrange it as follows... pre: 1234 post: 3412 I have been searching for a method to convert a char array to an int, so I can use the code below. Am I using atoi() incorrectly? The result I get when … | |
I've been Programming in C++ for a year. I am done with Basics and all other OOP concepts(like inheritance,polymorphism and STL) I want to be a game programmer, but i don't know what to study now? I've heard about OpenGL, DirectX, GUI libraries as a result i m confused to … | |
Hello, I have an array and need to sort it so that the highest numbers show first etc.. I have written this: [code] for(int i=0; (i < 26); i++) { while(counter[i] < counter[i + 1]) { int temp = counter[i]; counter[i + 1] = temp; counter[i] = counter[i + 1]; … | |
Hey.. Is it possible to make PHP type arrays? Like keys? For example, I have an array of numbers, and an array of letters.. A = 10 B = 20 C = 30 And then I sort the numbers so that the highest number is at the top etc.. But, … | |
Can any one help me put my pointer by gotoxy function inside the matrix that,s like as below: [CODE]void gotoxy( short x, short y ) // function to handle position of cursor on the screen { HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE); COORD position = { x, y }; SetConsoleCursorPosition( hStdout, position … | |
hi; I'm trying to program a circular link list with a head node , I have a problem with insert function . wanting to do it like this but with a head node >> [url]http://geeksforgeeks.org/wp-content/uploads/cll1.gif[/url] this is my function :: [CODE] struct node{ int data; node *next; node(int x,node *n=NULL){ … | |
The names are in a txt. file and are categorized as 1. malename femalename. One being the number symbolizing their popularity in 2004. What I've been attempting to program is a program that will read a requested baby name from the user. Scan through all the baby names using an … | |
Hello everyone, my assignment is to calculate each student's test average and final letter grade from a class of 20 students with 3 tests. The scores for each test are located in the text files that I am attaching. I have worked on this code for some time now, but … | |
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 … |
The End.