Ok I've solved it
Type: Posts; User: Sailors
Ok I've solved it
This is what I've written so far, it works by printing out the values but I wish to store it in as an array of doubles like I was trying to do in my earlier code, but don't know how to incorporate...
Please someone should help me out on how to amend the code, so I can read in my data please.
I tried to read a csv file into my array using this code. But it seems to read in only the first value. When I print it I get
5.0000 0.0000
0.0000 0.0000
0.0000 0.0000
0.0000 0.0000
...
Thanks but that's still doesn't solve the problem
That's a typographical error, I've corrected it and used int main, but I'm still getting 0.0000 values.
Thanks I've inserted double slash it's now giving me an out put but not the values I have in my spread sheet. It's giving me 0.00000 0.00000 all through. What else could I be missing?
I have a set of data(integer values) in excel stored on my desktop and the format and the full path is "C:\Documents and Settings\USER\Desktop\data.xls" I'm trying to read it and store in an array,...
This works when I input the values using the keyboard, but I want to have the array declared and the whole string passed on from main() to getop() and still have the same result. I feel the...
I've gotten it don't worry, thanks
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#define MAXOP 100 /* max size of operand or operator */
#define NUMBER '0' /* signal that a number was found */
#define MAXVAL 100 /*...
I've tried all you suggested about the pointer in this code but it didn't work. I guess it will be better if you can try same and see if it wil work and tell me where the problem is
The code works well but I wish to represent the s[0], s[1], s[i], s[++i] using pointer notation and still have the code working. eg input 4 5 + , output 9 which correct
#include <stdio.h>...
I've tried both still same error message.
I used (*(stp+i++)) but it's giving me "invalid value assigment" when I try to compile
I used (*(stp+i++)) but it giving me "invalid value assignment" when I try to compile.
It's not working, I wish to ask is s[++i] == *(stp+i) and s[i]==*(stp) in pointer notation? Assuming I declared stp=s, just like I did above.
This is what I tried doing could it be correct but I guess I'm missing out something!!!
int getop(char s[]){
char *stp;
stp = s;
int i, c;
while ((*(stp) = c = getchar())...
Dereference it how? I don't understand
I'm a beginner, please can somebody convert s[0], s[1] s[i], s[++i] to pointer notation for me in this piece of code. I'm finding pointers a bit confusing.
int getop(char s[]){
char *stp;
...
Can someone help me out here!!!
It will be better if you can give me the solution to this as you said you've worked it out for me to study it and know what I've done wrong, and learn from it. If we're seeing each other physically...
I can't see anything here.
that's using sprintf()
Hi, Mats I've been trying this since then with the hint you gave to me, but have not been able to crack it. I've not been idle since then, we equally learn by example. Since I've been on here I've...