# Search:

Type: Posts; User: Structure

Page 1 of 14 1

1. ## Thread: Parenthesis in convoluted if statements [FIXED]

by Structure
Replies
3
Views
261

### C Operator Precedence - cppreference.com...

C Operator Precedence - cppreference.com
2. ## Thread: How to write this code in pseudocode?

by Structure
Replies
2
Views
233

### difference = ( open_time - close_time ) ;

difference = ( open_time - close_time ) ;
3. ## Thread: Sum of octals found in input

by Structure
Replies
6
Views
200

### #include #include ...

#include <stdio.h>
#include <string.h>

#define true 1
#define false 0

int i, j, x, y, c, r, isOctal = false ;
char currentChar, octalDelim[1024] ;
float totalValue = 0.0 ;
4. ## Thread: A function to count the amount of unique chars in a 2D array

by Structure
Replies
6
Views
303

### #include #include int...

#include <stdio.h>
#include <string.h>

int uChars( char *string ) {
int hasChar[256] = { 0 }, totalUC = 1;
for ( int i=0; i<(strlen(string)-1); i++ )
hasChar[ string[i] ] = 1 ;
for...
5. ## Thread: Tic Tac Toe game - Playing against the computer

by Structure
Replies
5
Views
288

### #include #include #include...

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int valid = 1, endGame = 0, currentPlayer = 1 ;

#define playerTwoIsComputer 1

#define playerOne 'X'
#define playerTwo 'O'
6. ## Thread: I can't figure out why my code is rounding to a wrong number.

by Structure
Replies
5
Views
266

### celsius = (float)( (fahrenheit - 32) / 1.8 ) ; ...

celsius = (float)( (fahrenheit - 32) / 1.8 ) ;

C - Type Casting - Tutorialspoint
7. ## Thread: Help with functions

by Structure
Replies
3
Views
186

### #include #include char...

#include <stdio.h>
#include <stdlib.h>

char ItemChosen = 0;
int Orange = 0, Apple = 0, Pear = 0;
int Budget = 0, RemainingBudget = 0;

void checkChoice();
void setPrices();
8. ## Thread: I cant understand the output

by Structure
Replies
6
Views
458

### int x = 1; printf( "%d %d %d\n", ++x, x, x++...

int x = 1; printf( "%d %d %d\n", ++x, x, x++ );"there is absolutely no guarantee that this order would be used in any other environment, in the same environment with different options selected, or...
9. ## Thread: Making a teapot using triangles

by Structure
Replies
8
Views
535

### Utah teapot - Wikipedia...

Utah teapot - Wikipedia
Graphics pipeline - Wikipedia
Polygon mesh - Wikipedia
10. ## Thread: Checking if the input is a character ?

by Structure
Replies
16
Views
807

### This one includes integer fractions ... ...

This one includes integer fractions ...

int isNumber( char *string ) {
int oneDot = 0, stringLength = strlen(string), ii;
for (int i=0; i<stringLength; i++) {
ii =...
11. ## Thread: Checking if the input is a character ?

by Structure
Replies
16
Views
807

### preemptive fix... int isNumber( char...

preemptive fix...

int isNumber( char *string ) {
int oneDot = 0;
for (int i=0; i<strlen(string); i++) {
if ( (int)string[i] >= 48 && (int)string[i] <= 57 ) {
//...
12. ## Thread: Checking if the input is a character ?

by Structure
Replies
16
Views
807

### int isNumber( char *string ) { int oneDot =...

int isNumber( char *string ) {
int oneDot = 0;
for (int i=0; i<strlen(string); i++) {
if ( (int)string[i] >= 48 && (int)string[i] <= 57 ) {
// valid digit ;
}...
13. ## Thread: Checking if the input is a character ?

by Structure
Replies
16
Views
807

### int isNumber( char *string ) { int oneDot =...

int isNumber( char *string ) {
int oneDot = 0;
for (int i=0; i<strlen(string); i++) {
if ( (int)string[i] >= 48 && (int)string[i] <= 57 ) {
// valid digit ;
}...
14. ## Thread: Checking if the input is a character ?

by Structure
Replies
16
Views
807

### #include #include int...

#include <stdio.h>
#include <string.h>

int isNumber( char *string ) {
for (int i=0; i<strlen(string); i++) {
if ( (int)string[i] >= 48 && (int)string[i] <= 57 ) {
//...
15. ## Thread: Matrix behaviour: assignment to scalar

by Structure
Replies
6
Views
610

### multiply the identity matrix by the scalar. ...

multiply the identity matrix by the scalar.

"The term scalar multiplication refers to the product of a real number and a matrix. In scalar multiplication, each entry in the matrix is multiplied by...

by Structure
Replies
1
Views
243

### this might help... #include ...

this might help...

#include <stdio.h>

void primoultimopari(char list[], int dimensione, int *prima, int *ultima) {
*prima = -1;
*ultima = -1;
for (int i=0; i<dimensione;...
17. ## Thread: How to verify my incoming UDP packet correctly?

by Structure
Replies
30
Views
835

### I can understand this, but why include an entire...

I can understand this, but why include an entire library for one function?
Although i used strlen, i'm saying it could be useful sometimes to create the one function you need.

by Structure
Replies
30
Views
835

16198

16199
19. ## Thread: How to verify my incoming UDP packet correctly?

by Structure
Replies
30
Views
835

### considering what this code does, this is...

considering what this code does, this is disturbing.

16197
20. ## Thread: How to verify my incoming UDP packet correctly?

by Structure
Replies
30
Views
835

### also i believe when you do this: ...

also i believe when you do this:

packetBuffer[len] = 0;
you actually want do do this:

packetBuffer[len-1] = 0;
also, you are going to want to zero terminate both strings.
21. ## Thread: How to verify my incoming UDP packet correctly?

by Structure
Replies
30
Views
835

### printf( "[%s]", packetBuffer ); if you don't...

printf( "[%s]", packetBuffer );

if you don't see [101_idle] but you see [101_idle(+ some other bs)] ;

that could be your comparison problem.
22. ## Thread: How to verify my incoming UDP packet correctly?

by Structure
Replies
30
Views
835

### Where you commented out the comparison, print out...

Where you commented out the comparison, print out the buffer to the console to see what it actually recieves.
23. ## Thread: How to verify my incoming UDP packet correctly?

by Structure
Replies
30
Views
835

### I'm looking at your code... go back to what...

go back to what you had i have a better idea of what you are trying to do.
24. ## Thread: How to verify my incoming UDP packet correctly?

by Structure
Replies
30
Views
835

### #include #include const...

#include <stdio.h>
#include <string.h>

const char *isAvailable = "_available";
const char *notAvailable = "_disabled";

char tables[10][32];

void enableTable( int table ) {
strcpy(...
25. ## Thread: How to verify my incoming UDP packet correctly?

by Structure
Replies
30
Views
835

### ok, this is what i would do... compile this as a...

ok, this is what i would do... compile this as a seperate program and take a look at it... give me a min.
Results 1 to 25 of 349
Page 1 of 14 1