49,761 Topics

Member Avatar for
Member Avatar for iamthesgt

This is another homework problem. I thought it was easier, and I wouldn't need help, but I keep getting a segmentation fault when running the program. The assignment is to use a recursive function to output the amount of candybars we can buy with a user-inputted amount of money. Each …

Member Avatar for markshah2
0
625
Member Avatar for lavenzo

hi, i having some problem here. I have a DLL written in C# but I need to re-write it in C++ using visual studio 2005. I have no C++ language..o.O so could some one help guide me? help translate my code..should i use new project > 'Class Library' project or …

Member Avatar for thines01
0
2K
Member Avatar for Dakot

hello , i'm trying to solve this problem [QUOTE]Create a program which generates fibonacci series till a number 'n' where 'n' is entered by the user. For eg. if the user enters 10 then the output would be: 1 1 2 3 5 8 (beginner)[/QUOTE] the problem is that the …

Member Avatar for WaltP
0
181
Member Avatar for triumphost

I have a file that has the layout: [CODE] 0 0 0 1 1 0 1 1 [/CODE] I want to read it into a multidimensional array and use the values. The thing is I don't know how to read it in.. I can read the amount of columns and …

Member Avatar for triumphost
0
241
Member Avatar for coolbeanbob

Hello all, I have created an array of linked lists called hash_array[]. I am trying to write a search function. I am getting compiler errors on line 7 & 9. They are below. Line 7 warning C4018: '<' : signed/unsigned mismatch Line 9 error C2784: 'bool std::operator ==(const std::list<_Ty,_Ax> &,const …

Member Avatar for triumphost
0
78
Member Avatar for efronefron
Member Avatar for slygoth

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

Member Avatar for Ancient Dragon
0
64
Member Avatar for seraphina

[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?

Member Avatar for rubberman
0
278
Member Avatar for deeps2_daniweb

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 …

Member Avatar for raptr_dflo
0
2K
Member Avatar for Adnan671

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 …

Member Avatar for raptr_dflo
0
3K
Member Avatar for coolbeanbob

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 …

Member Avatar for coolbeanbob
0
86
Member Avatar for knowill
Member Avatar for raptr_dflo
0
241
Member Avatar for ThePolid

[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; } } …

Member Avatar for raptr_dflo
0
221
Member Avatar for optimumph

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 …

Member Avatar for mzimmers
0
220
Member Avatar for negin1234

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

Member Avatar for raptr_dflo
0
90
Member Avatar for coolbeanbob

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: '=' …

0
87
Member Avatar for coolbeanbob

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]

Member Avatar for coolbeanbob
0
44
Member Avatar for stereomatching

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

Member Avatar for mike_2000_17
0
1K
Member Avatar for stereomatching

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; …

Member Avatar for stereomatching
0
144
Member Avatar for phorce

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 …

Member Avatar for frogboy77
0
153
Member Avatar for erum

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); …

Member Avatar for erum
0
176
Member Avatar for beaute

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 …

Member Avatar for mike_2000_17
0
143
Member Avatar for coolbeanbob

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 …

Member Avatar for coolbeanbob
0
411
Member Avatar for awesome_cool

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 …

Member Avatar for thines01
0
517
Member Avatar for phorce

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]; …

Member Avatar for phorce
0
100
Member Avatar for phorce

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, …

0
71
Member Avatar for manobaby

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 …

Member Avatar for raptr_dflo
0
549
Member Avatar for AbEeR Q8

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){ …

Member Avatar for raptr_dflo
0
388
Member Avatar for mcclainra

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 …

Member Avatar for raptr_dflo
0
1K
Member Avatar for sanonite

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 …

Member Avatar for sanonite
0
240

The End.