49,761 Topics

Member Avatar for
Member Avatar for compsci91

I am trying to create two functions both named maximum (which overload each other) that compute the maximum of two arguments. The first should find maximum of two arguments of type double. The second should accept two arguments of type string (not C-string types) and should return the argument that …

Member Avatar for m4ster_r0shi
0
156
Member Avatar for won212

Hi any expert know what wrong's with this? I have 102 syntax error. I am suspecting did i miss out identify #include something like #include stdio.lib or? Please help me! thanks! I have been posting entries but none of the expert solved this. So hope you do, thanks! By the …

Member Avatar for Lerner
0
115
Member Avatar for Ricky65

Hi I'm looking to upload files using http post using winsock and have a php script handle it. I've got it working fine for text files but with files that contain null characters such as exes it doesn't work. It is only copying the file buffer up to the null …

Member Avatar for bakri
0
1K
Member Avatar for Chuckleluck

Hello, Please excuse me if this isn't the correct place to post this topic. I have a friend that knows PHP, and I know C++. We want to make a PC game together. I would handle making the core game, and he would use PHP to create a server, allow …

Member Avatar for cereal
0
223
Member Avatar for BryantFury

Hi ive made a program that does 3 things. 1. lets you enter 2 words to form one word ( red + cat = redcat ). 2. opens a separate txt file. 3. checks what you entered is the same as one of the words in the separate txt file. …

Member Avatar for BryantFury
0
123
Member Avatar for amyparker1234

Hi just started C++, was forced to take the class I just need some help I have to, not watn to, but have to take C++ as my course we are given this homework, CAN YOU PLEASE HELP ME!?!? I will be forver gratfull!! You will develop a simple windows-based …

Member Avatar for Ancient Dragon
0
150
Member Avatar for Muni123

I am having some proplems with my code - I am told to create a mouse and apple game and I am having some trouble with using the array in different funtions. Here is a short version of my code - //defining the size of the grid const int SIZEY …

Member Avatar for Muni123
0
194
Member Avatar for TheWind147

Below is a merge sort function provided by my instructor, my task is to create a program that asks the user to input numbers in random and choose which type of sorting algorithm he wants to use to be able to sort the numbers, I managed to finish quick sort …

Member Avatar for TheWind147
0
323
Member Avatar for xtinab

Hello all, I'm having trouble writing a recursive algorithm to traverse a Huffman tree to encode a message. I'm sure you all know what they are. Here's my algorithm: string HuffmanCode(const char& symbol, const TreeNode<SymbolPriority>* huffman, string &code) { //Base case: you are in a leaf; if the leaf contains …

Member Avatar for histrungalot
0
1K
Member Avatar for poolet

Ok . I am writing a game that generate random 6 array numbers from 1 to 10 the program MUST be using by srand(time(NULL or 0)); Now, I want, because it's a little bit of difficult to generate series per second something that the program will generating the numbers auto.. …

Member Avatar for poolet
0
227
Member Avatar for motrcolt

Alright so my task was to make a program in C++ that when entering a year would output the date easter landed on and this is what we were given a=year MOD 19 b=year/100 c=year MOD 100 d=b/4 e=b MOD 4 f=(b+8)/25 g=(b-f+1)/3 h=(19a+b-d-g+15) MOD 30 i=c/4 k=c MOD 4 …

Member Avatar for zeroliken
0
585
Member Avatar for ashboi

C++float assigned to unsigned long y I have to write separate C++ expression for: 1) extract the 8-bit exponent field to the low order bits of y, and subtract the 127 bias. 2) isolate the mantissa field in the lower order bits of y, and insert the implicit leading 1. …

Member Avatar for histrungalot
0
87
Member Avatar for nuclear

It seems that i dont fully comprehend how rotation works. So leys say i have a cube and i do this: x = 90.0f; rotatef(x, 1.0f, 0.0f, 0.0f); Notice that my code here may be not all correct, its like that just to symbolize what i mean. So by doing …

Member Avatar for nuclear
0
4K
Member Avatar for alanso

C++ Write a program TWO (2) groups of students at a private college university are enrolled in certain special courses during the special semester. The courses are taught by different lecturers. At the end of the semester, both groups are given the same tests for the same courses, and their …

Member Avatar for alanso
0
117
Member Avatar for benjamin tan

Hi all pros, can anybody teach me write this programme in c++??? Problem Statement Write a simple Mathematics quiz application which has six selections as below: 1) To register number of participants and name 2) To set level of difficulty (level: Beginner or Advanced) 3) To start the quiz (default: …

Member Avatar for asha11
0
458
Member Avatar for FelineHazard

Hi guys, I'm learning C++ from a book and I have a question about defining unary operators: In the book I'm working with there's an example, where they define a class called point, and define ++ operator for point *as friend*. here's the example: ~~~ c class point { int …

Member Avatar for FelineHazard
0
213
Member Avatar for while(!success)

Hey guys, I am writing a program which uploads a text file into a linked list then displays a menu prompt to the user. All of my functions work fine except when I try to exit the menu/program. The program crashes and I don't see where it is coming from. …

Member Avatar for while(!success)
0
240
Member Avatar for FraidaL

This code is supposed to output a hollow square (size and symbols to be determined by the user), but it doesn't do that. First of all, if I set the size of the square to be 5, it outputs 10-5 sets of both symbols. Also the right column is in …

Member Avatar for FraidaL
0
186
Member Avatar for Aneeque

My code is perfectly working on Borland compilers but its not working on MS VISUAL STUDIO ..... please help me that how can i run this code into visual studio ...... ~~~ #include<iostream.h> #include<conio.h> #include<stdio.h> void main () { char array[11]; int temp; array[2]='/'; array[5]='/'; cout<<"Enter Date: "; for (int …

Member Avatar for VernonDozier
0
83
Member Avatar for phummon

Hola code gurus, I’m wondering if there’s a way to use a string to access a specific item in a matrix of int[X]. I have a program which uses enums as iterators to reference a large amount of data. To select an item in the matrix, the user will enter …

Member Avatar for phummon
0
330
Member Avatar for dheredhere

Hey guys! I have an encryption project for school and i have to randomly generate a 3x3 matrix. I know how to assign the values to the 2d array but i am unsure how to return the array. I know it is possible to return a vector of a vector …

Member Avatar for deceptikon
0
318
Member Avatar for 46agogo

Hi, I'm making a windows port of some tftp client / server code [from here](http://www.applied-mathematics.net/myself/myself.html) I've got the server working sucessfully with a diffrent client, however I have come to an impasse with the client code. As I keep getting a server unreachable error, having tried over my local network …

Member Avatar for histrungalot
0
483
Member Avatar for jdh1231

This is a simple tictactoe game using Constructor member function I have a problem of outputing if someone won the game or tied. Everything seems working fine. Can anyone mind check for me? I tried to find the problem for so long. Thank you. #include <iostream> #include <iomanip> using namespace …

Member Avatar for Marcusflint
0
194
Member Avatar for dinners

I want to read the contents of a file and input them as variables. I have written this code: while (!numbersList.eof()) { numbersList >> type >> num1 >> num2; Complex *object = new Complex(type,num1,num2); cout << "For line number " << n << ": " << endl; object->printAll(); cout << …

Member Avatar for m4ster_r0shi
0
98
Member Avatar for Deepthikota

Dear group members i want a code to extrct the pixel information from the image in C++ send me da code asap..

Member Avatar for Moschops
0
56
Member Avatar for MasterHacker110

I have written this code to get the file in a directory, now i want to make it open the .txt & .ini & .docx and print this line: "=== THIS FILE HAS BEEN COMPRIMIZED ==="; in the file, need help with that code please. Here is my code to …

Member Avatar for mike_2000_17
-1
182
Member Avatar for longlostbro

Background Due to a decrease in advertising profit, your favorite (and previously free) social networking site has decided to charge a monthly fee to each member. Frustrated, you set out to make your own social networking site, VisageTome. For now, you will need to make a class to store each …

Member Avatar for longlostbro
-1
147
Member Avatar for PuQimX

i have problem with my code to search node in link list. can anybody help me? sorry for my english.. node *temp1; // create a temporary node temp1 = (node*)malloc(sizeof(node)); // allocate space for node temp1 = head; // transfer the address of 'head' to 'temp1' bool find = false; …

Member Avatar for deceptikon
0
224
Member Avatar for Mosey Mo

When the score is greater than 100 points the program should ask me whether the score is correct The program should ask me whether the score is correct. The program should not add a score that is more than 100 points to the accumulator with out permission (if(score > 1000 …

Member Avatar for Zaqmjua
0
102
Member Avatar for Zaqmjua

#include <iostream> #include <string> using namespace std; int main() { string s; for (int i=0; i<10000; i++) { s+=1; for (int j=0; j<i; j++) {s+=0;} } cout << s; } This is a code i wrote to make s=110100100010000... until 10 to the power of 10000. However in the line …

Member Avatar for deceptikon
0
122

The End.