Jump to content

crocski

Member
  • Posts

    325
  • Joined

  • Last visited

Everything posted by crocski

  1. Do we really need a 2d array for this? I have no experiences with them at all. I feel like we are complicating a simple matter. correct me if I'm wrong of course. All I want to do is print a number and reprint it. BTW I tried the array-again; now none of my inputs are coming back, at least they were printing correctly. Just not with the right ID NO. Might scrap the whole No thing. Though its killing me.
  2. i'll try it again then, that's where it was originally. :mellow:
  3. storing the entries isn't the problem. I just need a primary key or entries number added to the entry for eg. ID NO: 1 Entry Name: Carvinal --------------------------------- ID NO: 2 Entry Name: Soca thats the format I am looking for. Note that I tried struct already. Now I am trying a global variable for simplicity.
  4. I started coding along time ago, but I have never taken it serious until recently. I realised that I cant wait for anyone to teach me; especially where I live, its not a common field. Youtube- newboston- just to get an understanding of syntax; dont expect to learn anything other then how to layout code. http://linustechtips.com/main/topic/14904-ultimate-programming-resources-thread/- My name is between there somewhere. lol Stackoverflow cplusplus coursera- something everyone should look into. its FREE. google is your friend really. There are some books out there. If you are a reader, go for it. youtube and that lynda site are good resources.
  5. extracurricular. i dont know if you're being sarcastic about learning code. I do have a few sources to start.
  6. Ive been at this since I started the code. the code is a simple project management for an assignment and I wanted to act a bit extra. Though I am not able to figure how its done. I want to have an primary key or entry number for my entries. typedef struct{char entryname [50];}project;int numprojects // global variablevoid functionadd (void){printf(" ID NO %d\n", numprojects++); // this is the closest i've gotten; this worked for incrementing after the entry is saved.}void printentry (int x){if (x!= -1){printf("ID NO %d", numprojects); // when its prints- its prints a random number like 6 pair instead of 1 which is starting numberprintf (" ENTRY NAME : ", project[x].entryname); // for effect }} every this I save the entries, though they all increment as they should. When I call to print to the entries, its starts at 4 or 8 instead of 1. I hope this was clear enough. Dont might my variables, they're added for effect.
  7. Thanks alot guys. I definitely have to read up on pointers now to fully understand how i can further implement it. as an array alternative for a question like this. Thanks again for all your suggestions and help.
  8. How would you go about looping scanf ? tried nothing worked- Well if worked but it keeps going on after i enter ten set of ints. Probably because its set to loop looking the number 10. Instead of actually just printing 10 times. I think pointers might be the solution. I'm currently doing some reading. It seem a little tricky. We'll see.
  9. As i stated, it was a question i found on a past paper. It was pretty vague though about the things you mentioned. I have revisied the question (It has also been made clear that Im not allow to use arrays to solve the problem) and it mentioned some other stuff about storing the integers in a file. I will try it again as I do not just want to throw out the question without attempting it properly first. Thank you for your response. Though I had a few of the same questions in approaching the question.
  10. ive been trying to write this program i found on a past paper. I am due to write exams in a couple of months. The program should accept no more than 10 numbers and prints each one a separate line. I know this isn't a homework assist forum. BUT... This is what I have so far #include <stdio.h>#include <string.h>#include <stdlib.h>int main() { int arr[10]; int x; printf ("enter no more than 10 numbers:"); scanf("%d", &x); if (x < arr[10]) { for (x=0;x<arr[10];x++) { printf("%d\n",arr[x]); }} else { exit(0); } return (0);}
  11. Pretty dangerous using opera 12 after sooo long. Lol I give up on opera after they released 16. After so many good years. It was terrible. As you said alot of the great features (which made it stand apart as a browser) were excluded. I now settle for the mediocrity Firefox has to offer.
  12. Pretty dangerous using opera 12 after sooo long. Lol I give up on opera after they released 16. After so many good years. It was terrible. As you said alot of the great features (which made it stand apart as a browser) were excluded. I now settle for the mediocrity Firefox has to offer.
  13. the build, the setup all look amazing. and DAT ASS too.. I had to do it. =D whats the monitor you're using? No worries when back to the OP
  14. soo much orange.. very nice build. handy with the camera too.. does anyone know how to do the writing that on the front. How'd you go about doing that.
  15. looks to be interesting, take your time, but dont take too long.
  16. Are you really into cheif keef and flocka, or are you trolling?
  17. Earl sweatshirt, kendrick lamar, ab soul. I listen to other rappers, but i dont consider them my favorite. These three are dope asf hand down.
  18. This was incredible build log to follow.. Great Job! curious to see what you come up with for the keyboard tray.
×