Hello. I'm going back over some C++ stuff. The following program is the usual way I might get user input into a private member of a class.
#include <iostream>
class Account {
private:
int...
Type: Posts; User: jack jordan
Hello. I'm going back over some C++ stuff. The following program is the usual way I might get user input into a private member of a class.
#include <iostream>
class Account {
private:
int...
It has been a while since I last posted, so hello.
I've studied pretty intensely now for about a year and a half. I've spent about 1000 hours in both C and Java, as well as 500 hours in C++ and...
It seems I was wrong about this. I had assumed that x would get dereferenced first, but it seems that C's order of operations work differently than I thought they did.
I believe that this is the...
p and q have been declared as int pointers, so when they are incremented or decremented, they move one int space forward or one int space backward. In an example:
int num[10] = {1, 2, 3, 4, 5,...
I believe scanf looks a bit like this:
int scanf(int* bird) {
// read input stream
// save next int into variable bird
// return number of items read
}
while printf for example...
I may not be quite understanding what you are trying to say, but according to your instructions:
Honestly the two functions part doesn't make sense to me. From what I do understand, your print...
I have what I think is some valid criticism for your code beyond what you have asked for. I think it is a little bit better if you could keep the scope of a variable within the area which it is...
I agree :)
This is a fun problem though I think. I coudln't resist making my own version with deal and print.
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
...
Are you saying that he has non-ASCII characters in his code? Is he somehow getting formatting characters or something in a copy-paste? I really have no idea what a stray error is. I've never gotten...
if (0 < marks && marks > 40)
is the same as:
if (marks > 0 && marks > 40)
in this case, whenever marks is equal or less than 40, this if condition will evaluate to false. It may as well be...
Are you saying that the first full moon which occurred in the year 2000 happened in July?
Or perhaps that is the full moon you chose as your first. Though you did write:
Full moon calendar.
You can make a header file and include it in future projects. The header file may have useful functions you would not have to define in future files but could still use.
Libraries are only...
Might the DAQlib.h be a library specifically built for your online course at coursehero? If not, I am not sure what that is. I think it is important to know though because I believe it is needed for...
I feel like I am coming up on the end of my C language learning experience. I have spent about 1,000 hours in it for the last six months. I have written about 500 programs. Many of them only took 10...
void display_list()
{
struct list_collection *temp;
struct list_collection *previous;
int c;
current_list = head_list;
temp = current_list;
...
I realized one second later I was wrong in what I said in this post.
You certainly have some interesting code. It is difficult for me to keep track of where all your pointers are going, and the way you use your structs is different from the way I am used to doing...
Before understanding your code I see this:
/* switch meny */
int val, i;
while (val != 6) {
val does not have any value inside it. In order to compare it correctly, it needs an assignment...
In the real game 21, the dealer never makes any choice as to what options to take. The dealer has to play by specific rules. If your game is similar to 21, then the computer player should be doing...
In the example question you posted, the OP is asking about passing an array to a function. This is a little bit different than your plain array definition.
After thinking about this more, I wanted to correct myself and address the OP's concern more.
Actually, it is the denominator that approaches max int size, but I don't believe it ever becomes a...
Math programs are difficult for me to put down I guess. I finished a program which can run a Leibniz series far beyond my computer's ability to process it. I had expected better results though....
I didn't actually read your code, so my post might just be gibbering madness. Sorry about that.
From what I understand you are trying to concatenate numbers. By your example:
1. User enters 1,...
GReaper gives the best advice on this, but not the most fun advice I think :)
The following is an example of how you can make your own fraction calculations to hundreds of places if you like. If...
Just a little code criticism:
gets(array[i].city);
Use fgets so you don't try to assign too many characters into the char array.
fflush(stdin);
fflush(stdin) is undefined behavior. fflush is...