Beginners - December 2015 (Page 36)

by Fl4v10
If statement, float comparison ERROR
 
Hi, I am using an if statement to compare 2 floats. You can see the code below. I have the VE class, where x is a float. In this function a ve_in struct en...
[1 reply] : Even if it prints that the values are equal, it still enter in the st... (by cire)
countdown and pattern
 
Write your question here. how do i make a hollow rectangle and put a countdown in it? for (i=0;i<=ni;i++) { for (j=0;j<=nj;j++) { printf("*"); ...
[4 replies] Last: The post I linked to shows how to use SetConsoleCursorPosition in or... (by Chervil)
Counting even Linked List
 
I am trying to only count even number of nodes in a linked list and then delete them. However it doesn't count all the even number and deletes everything. Where...
[1 reply] : removeEven makes no effort to keep the structure of the list in tact... (by cire)
Pass by reference
 
I want to read 3 txt file and then extract the words and do some calculation on the frequency etc. But the 'find' function doesn't work properly. You can fi...
[1 reply] : I would suggest that you first fix all your compiler warnings and erro... (by jlb)
Simple random number generator with Gaussian probability distribution
 
Was wondering if anyone knows of an easy way to have a random number generator that has a gaussian probability distribution. Currently I am using rand(), bu...
[2 replies] Last: Thanks! (by santib77)
Why is my character array affected by unrelated code above it?
 
This code was written specifically for the purpose of identifying a bug in another one of my programs. The first paragraph takes command-line input and encrypts...
[13 replies] Last: Thanks a lot, you guys. I appreciate the help. (by btunde08)
by uhuru
Need Help with Homework
 
Hi, i have an homework about writing in Dev c++ a program where you put two points coordinates(x1,y1) and (x2,y2) and the program must use gotoxy to draw a "*" ...
[1 reply] : First of all you need the slope of the two points. With this slope you... (by coder777)
Finding the largest of an unknown amount of numbers
 
I need help with this program. I need to find the largest of a group of files but I have got stuck. Help please #include <iostream> #include<vector> u...
[1 reply] : ignore the comments on GreatestInput() forgot they were there (by m4rkybob)
How can I make a function works for both array and vector parameter
 
I would like to pass both array and vector parameters in this function . i.e. vector<string> &li How could I adjust it? Thanks! void sort(int i,vector<str...
[2 replies] Last: void sort(int i ,vector<string> &li, string names , int name_count... (by Thomas1965)
by asam22
Segmentation Fault DEBUG Help
 
I can't seem to figure out what's the problem when it just says "segmentation fault" as the error when I try to compile my main and .cpp file. A [csc...
[1 reply] : Due to line 57 (note: = instead of ==) counter will always be 0. You... (by coder777)
bug fixing
 
Ok now this may sound like a dumb question but......... how do people fix bugs in their programs. And no i dont mean the ones where its like you forgot the ; at...
[1 reply] : Well, first you try to identify the module where the error occurs from... (by coder777)
c++ calculating deer population for consecutive 10 years
 
the assignment: Write a C++ program to estimate the springtime count of deer in a park for 10 consecutive years. The population of any given year depends on the...
[5 replies] Last: Oh...that just made me realize I'm an idiot. Thank you so much for you... (by verbrendos)
How do I declare this?
 
I need to delcare patronIDMatch and bookIDMatch as bools, but i dont know how to do it without editing the header (which i'm prohibited of touching) /...
[1 reply] : Library.cpp:88: error: ‘PatronIDMatch’ was not declared in this s... (by TheIdeasMan)
Validating whether input is an integer
 
i'm working on this lab.. ********* - Write a C++ program consisting of main plus two other functions which will do the following: - Take an integer input ...
[10 replies] Last: This is where you need to read up on streams etc in more detail to tra... (by closed account 48T7M4Gy)
Reading a certain number of digits
 
How would I go about implementing code that only reads a certain number of digits? For example, I want an integer to only read 5 digits so if the user inp...
[1 reply] : Probably the easiest way would be to use a string for the user input, ... (by jlb)
Defining function error
 
I'm getting some errors defining some functions here. I'm prohibited from changing my header files unfortunately :( here are the four errors: Book.cpp:20: erro...
[1 reply] : Look at your errors starting from the top: Book.cpp:20: error: protot... (by jlb)
calling a function
 
We started to call functions this week and I'm having a bit of an issue. Hours worked over 37 pays time and a half and hours worked 50 and over is double time....
[1 reply] : #include <iostream> double overtime( double hours, double rate ) ; ... (by JLBorges)
Manipulating arrays help
 
I need help with a project that requires the following. "The functions to be implemented are as follows: output() takes the pointer to the array and its size...
[1 reply] : Looks like you need to implement the functions prototyped in your head... (by jlb)
forum vs community vs message board
 
Write your question here. Hello ALL, i am new to c++ programming. I am wondering if there is a free or paid source code that I can integrate into a ...
[4 replies] Last: yes i have googled and i keep finding website codes for message boards... (by skywalking)
C++
 
Hello im new in C++ and I was wondering if someone could help me. Write a program that will count how many days are before date1 and date2 Dates are given f...
[1 reply] : So have you written any code yourself? Because people aren't going to ... (by YFGHNG)
December 2015 Pages: 1... 3435363738... 43
  Archived months: [nov2015] [jan2016]

This is an archived page. To post a new message, go to the current page.