-
Replied To a Post in class and objects
You might start out with a loop ... something like this: // bricks.cpp // // 2015/07/22 // // this version approximates count of bricks needed for a wall ... // … -
Replied To a Post in class and objects
It is *not* really the vol of the totalLength x totalHeight x totalWidth of a wall the determines the (min) *integer* number of bricks needed to brick up a real … -
Began Watching class and objects
The house is built of non-standard form. All four walls are of a rectangular shape, but different height and length. The width of the walls is two bricks. There are … -
Replied To a Post in class and objects
You need to firstly solve the math before you can code ... It is often helpful to solve a much simpler problem at first. If you start out with a … -
Began Watching Reading data into an array from a file
I want to read data into an array from a data file. Because I do not know, ahead of time, how much data is contained within the file I need … -
Replied To a Post in Reading data into an array from a file
> Can there be a vector of structures? Yes > I am guessing that with data.push_back(temp) the .push_back(temp) is a feature of the vector type. But, it does not seem … -
Began Watching structures
i need some help to input some prompting in a ready programm written by someone else for a school,thoughht all night,giving me no errors but the out put is not … -
Replied To a Post in structures
Can you show us the code you have tried so far? We really have no idea what your problem is ... until you show us that code. Try this next … -
Began Watching Progress of a Bubble Sort (C)
The bubble sort is slow and I thought it would be interesting to visualize the progress as it sorts an array of integers. -
Replied To a Post in Progress of a Bubble Sort (C)
Since this thread has been a little resuscitated ... it may be the case that some beginning students in C ... might like to know ... that a simple bubble … -
Began Watching Strange issue, in function char* prints correctly, while in main it's missi
Hello everyone! this is a code to reverse strings of a array of char ptr. I am passing the char* array, dynamically allocating memory to reverse and link with the … -
Replied To a Post in Strange issue, in function char* prints correctly, while in main it's missi
If you just wish to reverse the order of the lines in the array ... try this: /* demo_str_rev.c */ #include <stdio.h> void str_rev( char* ary[], int size ) { … -
Replied To a Post in Sub string replace in arr of char *
Or ... if you'd like to use dynamic memory to hold each C string and ... a dynamic array to hold all the dynamic C strings ... here is an … -
Began Watching how to program to sort in ascending/descendin order random using LL and DLL
**Question-1: Write a program to sort in ascending order random entered numbers by user using Linked Lists. - Size of LL is not limited - Entering numbers should be stopped … -
Replied To a Post in how to program to sort in ascending/descendin order random using LL and DLL
Do you know how to code a working shell program in C++ ? Do you know anything about using a C++ struct (or class) ... to hold the data for … -
Began Watching Shallow Copies?
I'm reading the book 'C++ Without Fear 2nd Edu' and I'm a little confused on the subject of shallow copies. The book says the problems can arise if you make … -
Replied To a Post in Shallow Copies?
Take a look here: http://fredosaurus.com/notes-cpp/oop-condestructors/shallowdeepcopy.html -
Began Watching how to calculate a common exponent from a bunch of float values??
this applies to 3D vertex coordinates if I was planing to lower the quality and byte size to a bu16, bs16, bu8, or bs8 mantissa, how would I calculate the … -
Replied To a Post in how to calculate a common exponent from a bunch of float values??
If I understand your problem, the solution is to define an 'inverse function' for each 'function' : def numSquared( num ): return num*num def inverseNumSquared( num ): return num**0.5 -
Began Watching Sub string replace in arr of char *
Hello Everyone, I got this question in some book. As per question we need to find a substring in a array of char* and replace it with another string. The … -
Replied To a Post in Sub string replace in arr of char *
You could try something like this: /* test_replace.c */ #include <stdio.h> #include <string.h> /* ... need to find a substring in a array of char* and replace it with another … -
Began Watching Nadia Team
Problem Statement: NAtural DIAlogue team at Orange labs has an abbreviation "Nadia Team". This abbreviation causes a big problem for them in Egypt as a lot of Egyptians think this … -
Replied To a Post in Nadia Team
Since this was your very first post at Dani's 'student friendly' place ... Do you have any idea how to start? 1. Is your data to be read from file … -
Began Watching Making this more compact
I have made this code. It is working good. Can anyone please help me to make it more optimised? Here is the code. /* ∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑ Author: Mayukh Sarkar Email: mayukh2012@hotmail.com … -
Replied To a Post in Making this more compact
You may like to see this link re. a way to handle new data types in C ... http://developers-heaven.net/forum/index.php/topic,2598.0.html -
Began Watching split string-multiple delimiter
Hello, so this user input all in one line string , i need to parse the input into two categories: user age and user name. for example , the user … -
Replied To a Post in split string-multiple delimiter
You could try something like this: // split_demo.cpp // /* i need to parse the input into two categories: user age and user name. for example, the user input -->> … -
Began Watching student record management system with linklist
**Student and Courses Record Management System (LinkList of LinkList)** In this Assignment you need to create a small student and courses record management system with following functionalities. 1- Add New … -
Replied To a Post in student record management system with linklist
Your problem can be more easily handled if it's broken up into two BIG steps... 1st step: Using the C++ library linked list, you can code and test out the … -
Began Watching compere two string
i try to compile this programme and thasn't work :p i think that the problem come from the string fonction (int r=strcmp( CL[j].nomC , cl);) #include <stdio.h> #include <conio.h> #include … -
Replied To a Post in compere two string
If you can handle more ... and if your spec's are to compile with a C++ compiler, (but to restrict the 'io' to C style), then ... this example ... … -
Began Watching Output from string datatype is not correct
#include <iostream> #include <cstdio> #include <conio.h> using namespace std; main() { FILE *fp, *ft; char another, choice; struct student { int id; string name; int age; char gender[7]; string address; … -
Replied To a Post in Output from string datatype is not correct
Your data-record structure is NOT what you need here ... Try something like this: // bloodGroups.cpp // #include <iostream> #include <string> #include <cstring> // re. strcpy #include <cstdio> // re. … -
Began Watching Veriables
hello all, i am a beginner, in C++ we declare varables for example just like(int (variable);. and after this we put some value to variable. but i want that system … -
Replied To a Post in Veriables
If you mean that you want the program to prompt for a variable name, you would also want to prompt for the variable type. You could use a C++ map … -
Began Watching help needed in programing
Write a function in C++ which accepts an **2d array and its size** as arguments/parameters and exchanges the values of *first half side elements with the second half side elements … -
Replied To a Post in help needed in programing
Can you write a 'prototype' for the function? (That could get you started?) -
Replied To a Post in C++ Program to Find the Shortest Cycle in a Graph
P.S. You may find some related examples here: http://developers-heaven.net/forum/index.php/topic,2614.0.html -
Began Watching need help please
Write a function to take an integer and two character. Your function should draw a shape similar to the one below. For example: DrawShape( 5, '#', '*') Outputs the following … -
Replied To a Post in need help please
This example also ensures the prgram will NOT crash if bad data was entered: // drawShape.cpp // #include <iostream> /* **when compiling it gave me the right shape and there … -
Began Watching C++ Program to Find the Shortest Cycle in a Graph
Hi. I need to write a program that finds the shortest route in directed graph. Please look at the picture. [Click Here](https://goo.gl/photos/uRdTfp9pDrAobun87) Here is my code: #include <iostream> using namespace … -
Replied To a Post in C++ Program to Find the Shortest Cycle in a Graph
You will find that help comes more readily if you present the problem clearly. Provide the shortest amount of code possible to illustrate the problem. State clearly the problem ... … -
Began Watching help pleaseeeeeeeeeeeeeee
**5. Consider a data file named STORES.DAT, which contains inventory information for four shops. Each line in the file contains the inventory of five types of merchandize in each store. … -
Replied To a Post in help pleaseeeeeeeeeeeeeee
The data file example you provided above ... looks defective? > ... Consider a data file named STORES.DAT, which contains inventory information for four shops. Each line in the file … -
Replied To a Post in Was this task even more difficult in the early days of C in 1970?
@Frederick2 Do you have any Windows graphic library function calls ... anything like this ... move_to(int x, int y); move_to(double x, double y); draw_to(int x, int y); draw_to(double x, double … -
Replied To a Post in C++ Getline function error with strings
This little demo may help ... // demo_cin.sync.cpp // #include <iostream> #include <string> #include <cctype> // re. tolower, toupper int takeInChr( const std::string& msg ) { std::cout << msg << … -
Replied To a Post in C++ Getline function error with strings
> what (does) cin.sync() do http://www.cplusplus.com/reference/istream/istream/sync/ -
Began Watching link list
Hey, I need to create a war card game. I have a problem with linked list - I read about it but still I have a problem with writing the … -
Replied To a Post in link list
This may give you some more ideas ... and some more tools (C utility functions) to use in your code: (You could use a 'Clist' by including file Clist.h available … -
Began Watching Was this task even more difficult in the early days of C in 1970?
I've been working on this project for about two weeks now. Essentially it checks the date, finds events for the day, tells you about them and even lets you plan …
The End.