49,761 Topics

Member Avatar for
Member Avatar for simonsayz27

I've seen different algorithms of backtracking including sudoko and moving queens on a chess board but I was wondering if there are any that explain how you would go about solving lets say a Rubik's cube or more like connecting multiple squares together which contain numbered edges that create a …

0
52
Member Avatar for masapo

I have been given an assignment to design and program a calculator using C++ and Ultimate ++IDE(Integrated development Environment). My code should have a class Calculator as a base class, and another class scientificCalculator which inherits from class Calculator. The Calculator class performs basic arithmetic operations. The scientificCalculator adds more …

Member Avatar for Narue
0
116
Member Avatar for Amreen

How to change screen colour, font colour, making various shapes , presenting slide shows in c++

Member Avatar for zobadof
0
53
Member Avatar for sara_2

please iwana to ansewr this question todaaaaaaaaaay iwana to help me>>>>>>>>>>> 4. (Combining Class Time and Class Date) Combine the modified Time class of Exercise 9.7 and the modified Date class of Exercise 9.8 into one class called DateAndTime. Modify the tick function to call the nextday function if the …

Member Avatar for kvprajapati
0
126
Member Avatar for qwertymk

Is there a way to determine the largest amount of continuous memory using either new or malloc(), preferably malloc tho. I am looking for a quick and easy function call and I don't want to have to loop through different values and see if it's available. A function that goes …

Member Avatar for kvprajapati
0
76
Member Avatar for newcpp

this is my codeļ¼Œ when I comment all output code(printf cout), the compiler told me "Debug Error!", why? [CODE]#include <stdio.h> #include <string.h> #include <iostream> using namespace std; int main () { char buf[]=" 1 1 1201 1 -0.349200000000000D+06 0.115200000000000D+06"; char* cpr; /* cout<<sizeof(buf)<<endl;*/ /* cout<<(buf+25)<<endl;*/ for (cpr = buf+25; cpr …

Member Avatar for newcpp
0
77
Member Avatar for EliteApple

[code] #include <iostream> using namespace std; struct Student { char Name[30]; float GPA; int Major; }; //Function prototypes Student* StudentData(Student* S1); void display(Student* S); void ChangeData(Student* S2); void GetStudents(Student array[], int size); void PrintStudents(Student array[], int size); //Main information build int main() { //Declare two objects of type 'Student' as …

0
68
Member Avatar for amishraa

Need help with calculating student grades using arrays. If I have the names and subsequent grades listed on notepad input file. eg. Name1 23 43 54 23 43 54 Name2 54 34 65 76 23 54 Name3 97 68 45 68 86 58 How do I setup two dimensional array …

Member Avatar for amishraa
0
151
Member Avatar for xman13157
Member Avatar for EliteApple

Hi everyone I need major help i took a class in c++ and was doing fine until the last challenge, I need help with it in every way, below is what is wanted but I cant understand anything please help me This program will include error trapping with try and …

Member Avatar for EliteApple
0
568
Member Avatar for Afupi

I am trying to sort out how to use the traversals in my tree to save to a txt file. Currently it is only ouputting the items stored within the node to the console. The traversals are located at lines 99-128 [CODE]#ifndef TREE_H__ #define TREE_H__ #include <string> #include <fstream> #include …

Member Avatar for mrnutty
0
105
Member Avatar for laelzio.mosca

Can someone help me please? I have to do this turkey project, everything is working ok, exept for my oven time. when it prints this line: [CODE]cout << "Put the turkey in the oven on the " << startThawDay + howLongToThaw <<"th " << " at " << ovenTime <<" …

Member Avatar for valtikz
0
84
Member Avatar for samweb$

I have the following code which works on the .txt file The file content is as given below. ;* ;* { = LanguageIso LANGUAGE_ISO = "EN" } [CODE] xlong MyProg::Import(const char* buffer, xlong x) { try { while (1) { if ((bytesParsed = AddLine(tmpSrcBuffer)) == -1) return FALSE; tmpSrcBuffer += …

Member Avatar for samweb$
0
114
Member Avatar for son2xp2go

im a beginner in programming..!! And i cant perhaps solve your beginner challenge..!! can you help me sir with my project??? it is making a program that works like in FLAMES.... The program asks for 2 names and it will count the similar letters in the 2 names... There are …

Member Avatar for mrnutty
-1
98
Member Avatar for jigglymig1

for this function i need help with the email part. I am trying to string compare domain with 3 different string possibilities (.com,.org,.edu). void add(char firstName[][32],char number[][9],char email[][32],char lastName[][32],int count) { int i; int length; char domain[3]; cout << "enter their name\n"; cin >> firstName[count]; cin >> lastName[count]; cout << …

Member Avatar for jigglymig1
0
90
Member Avatar for FancyShoes

why does this happen? I want it so that it does not display the text using an or statement and not using and or anything else. [CODE] if( 1 == (2 || 2 || 2)) { cout << "Should not display"; }[/CODE]

Member Avatar for Dave Sinkula
0
98
Member Avatar for kako13

Hi, I want to edit a record inside a txt file. So first a search for the record inside the file and display the record to the user. But for example, if the user want to edit the name, how I can go to that position? [CODE] void editar_cliente() { …

Member Avatar for Lerner
0
228
Member Avatar for Stefano Mtangoo

Hi all, to strengthen my C++ knowledge I want to code a DLL to record sound and write it to a file. So Far I want it to be windows based may be later Linuxed. So here is my first step, make simple program that does that. But I have …

Member Avatar for Stefano Mtangoo
0
86
Member Avatar for rena0514

hello again....i'm in need of help. for my final program for my programming two class i have to write a program doing operations on sets. i wanted to know if someone could put me towards the right direction and give me an example of a program using friends of a …

Member Avatar for rena0514
0
110
Member Avatar for infern0

Hi, I am having trouble getting the item and its calories to match. Could anyone tell me what is wrong with this bubble sort? Thanks [CODE]int main() { string food[100]; string search; int calories[100]; int x = -1; bool look = false; do { x++; cout << "Enter a menu …

Member Avatar for infern0
0
107
Member Avatar for infern0
Member Avatar for kele1

i'm trying to write a doubly linked list code but i'm having a lot of errors please help me identify what my problem it please thank you in advance[CODE] #include <stdio.h> #include <stdlib.h> struct listNode { char data; struct listNode *nextPtr; //struct listNode *prevPtr; }; typedef struct listNode LISTNODE; typedef …

Member Avatar for mrnutty
0
143
Member Avatar for tgreiner

I am having a problem with overloading an operator within a class structure. Below is the program that illustrates my problem. It defines a class Matrix, creates two matrices and multiplies them. I created to multiplication functions. The first is a straight function, the second uses the overloaded * operator. …

Member Avatar for Dave Sinkula
0
2K
Member Avatar for maverick405

I am working for this program all I want to display the users all attempted score and user gets only four chance to take quiz, the code below works fine the only problem is that 1. I dont want to display " Your Previous Score" for the first attempt, as …

Member Avatar for valtikz
0
153
Member Avatar for simonfoley

Hi there Just started an IT course recently, and although flying with HTML and other disciplines, I'm having trouble with some C++ syntax. I have a problem with a short piece of code I have to write, which has to read input from the keyboard for 5 fictional employees, each …

Member Avatar for simonfoley
0
231
Member Avatar for jennwenn25

Hello, Been trying to work on this tic tac toe game and I can't seem to figure out how to post the moves to the board. Everything as I have it now seems ok with the compilier but I just need help with that part. Let me know . . …

Member Avatar for Clinton Portis
0
214
Member Avatar for mike.bauer

I am trying to create an application that will create a lined box around multy-lined text that I have imputed at the keyboard, and i would like to be able to do the following with the boxed text. [LIST] [*]move the box around the screen. [*]The boxes should be able …

Member Avatar for Stefano Mtangoo
0
91
Member Avatar for therstonsplace

for our class project in my school we made a robot software and it is awesome i was on the math class and it was a lot of fun... i just finished the last part again last night cuz someone lost everything any way.. we have time to kill and …

Member Avatar for Ancient Dragon
0
88
Member Avatar for merse

If I want to define what is a double -> double function pointer I use: [CODE]typedef double (*double_fp1)(double);[/CODE] But what if I would like to distinguish const double -> double it is possible? And the above definition consists the const double -> duble function?

Member Avatar for mrnutty
0
101
Member Avatar for PDB1982

Can anyone tell me why I am getting this message: "...error C2296: '%': illegal, left operand has type 'double' " here is my code: [code] double Q1median(ifstream& students, string studentid[60], string fname[60], string lname[60], int Q1[60], int Q2[60], int Q3[60], int MidTerm[60], int Q4[60], int Q5[60], int Q6[60], int Final[60],int …

Member Avatar for DavidRead
0
116

The End.