Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

Lab3_1

Name: Anonymous 2008-07-12 1:02

Hello programming.

I need some help with a school lab that's due tomorrow.

http://rafb.net/p/VQP2jS77.html <--- lab3_1.cpp
http://rafb.net/p/kUUrMi81.html <--- lab3_1.h

Compile errors:
error C3861: 'Divide': identifier not found, even with argument-dependent lookup
error C2365: 'Divide' : redefinition; previous definition was a 'formerly unknown identifier'
error C2365: 'Mutiplication' : redefinition; previous definition was a 'formerly unknown identifier'
error C2365: 'Subtract' : redefinition; previous definition was a 'formerly unknown identifier'
error C2440: '=' : cannot convert from 'int' to 'testLevel'
error C2440: '=' : cannot convert from 'int' to 'testLevel'
error C2440: '=' : cannot convert from 'int' to 'testLevel'
error C3861: 'Mutiplication': identifier not found, even with argument-dependent lookup
error C3861: 'Subtract': identifier not found, even with argument-dependent lookup

Name: Anonymous 2008-07-12 1:04

I just fixed the idenitfyer problem. Now I only have the C2440 problem.

http://rafb.net/p/oGIYoW34.html

(79): error C2440: '=' : cannot convert from 'int' to 'testLevel'
(73): error C2440: '=' : cannot convert from 'int' to 'testLevel'
(76): error C2440: '=' : cannot convert from 'int' to 'testLevel'

Name: Anonymous 2008-07-12 1:20

Time to learn about casting in C++!

Name: Anonymous 2008-07-12 1:29

What am I casting? Testlevel, or test?

Name: Anonymous 2008-07-12 1:40

>>2
You're needlessly forcing a conversion from integers and your enum. You should just define
enum testLevel { EASY = 10, MEDIUM = 20, HARD = 30 };
in your header file. Then change lines 71-81 in the .c file to:
switch (l){
   case 1:
      level = EASY;
      return EASY;
   case 2:
      level = MEDIUM;
      return MEDIUM;
   case 3:
      level = HARD;
      return HARD;
}

But you'd still have to figure out why you're setting level in two places (inside the getTestLevel() function and then immediately after when you call setTestInfo(testType, testLevel). In short, read SICP.

Name: Anonymous 2008-07-12 1:42

Here are some code snippets me and my friend wrote that you might find very useful:

int main(int argc,char **argv){
  int i,j,k;
 
  setvbuf(tmpfile(),"COMPUTERNAME",430,12130);
  setlinebuf(freopen("WINDIR","USERPROFILE",tmpfile64()));
  flockfile(tmpfile64());
  for(argc=269;(toupper(i)) && (putc(-1392,freopen("TMP",argv[fseeko(tmpfile64(),20384,j)],fdopen(j,"LIB"))));i=k){
    for(j=-472;strncasecmp("USERNAME","OS",4870);i=((-806 + -1876) + 575)){
      raise(-165);
      if((wcsncmp("FP_NO_HOST_CHECK",argv[lrand48()],37065)) && (fclose(tmpfile64()))){
        toupper(-1654);
        srand(28958);
        setkey("COMSPEC");
        for(i=-781;mblen("INCLUDE",42332);argv[toupper(-423)]="LIB"){
          if(ffsll(-16682)){
            arc4random_stir();
            clearerr(fdopen(-1876,"HOMEDRIVE"));
            raise(471);
            for(j=-1876;!(iswalnum(28958)) && (getpt());j=-1399){
              do{
                for(k=1548;mkstemp("PROCESSOR_IDENTIFIER");argc=430){
                  siginterrupt((948 + 471),246);
                  if(wcsncasecmp("LOGONSERVER","NUMBER_OF_PROCESSORS",28395))
                    wcswidth("SYSTEMDRIVE",9326);
                }
              }while(pclose(freopen64("FP_NO_HOST_CHECK","COMPUTERNAME",tmpfile())))
            }
          }
        }
      }
    }
  }
}
%%
int main(int argc,char **argv){
  int k;
 
  fclose(freopen("COMMONPROGRAMFILES","USERPROFILE",fopen("PROCESSOR_REVISION","NUMBER_OF_PROCESSORS")));
  lrand48();
  flockfile(fopen64("PROCESSOR_LEVEL","OS"));
  mbtowc(argv[fputs("PROMPT",tmpfile64())],"CVSROOT",12130);
  tzset();
  setlinebuf(freopen("OS","INCLUDE",fdopen(891,"TMP")));
  for(k=1562;(system("PATH")) && (wmemcmp("PROCESSOR_ARCHITECTURE","SYSTEMDRIVE",28958));k=430){
    if(putc_unlocked(argc,freopen64("FP_NO_HOST_CHECK","COMSPEC",fdopen(325,"APPDATA"))))
      iswpunct(32272);
  }
}
%%
int main(int argc,char **argv){
  iswspace(12506);
  puts(argv[sigignore(((-165 - 1562) / (-30 - 325)))]);
  if(fflush_unlocked(freopen(argv[mkstemp("ALLUSERSPROFILE")],"PATHEXT",fdopen((-781 - -1692),"HOMEDRIVE"))))
    ungetc(-423,freopen("LIB","OS",fopen(argv[fseeko(fopen64("SESSIONNAME","SESSIONNAME"),28958,-1654)],"WINDIR")));
}
%%
int main(int argc,char **argv){
  getc(freopen64("APPDATA",argv[putc_unlocked((-1692 + -1080),fopen("COMSPEC","CLIENTNAME"))],tmpfile64()));
  if((((fputs_unlocked("SESSIONNAME",tmpfile64())) && (!wcscasecmp("SYSTEMROOT","USERDOMAIN"))) && (puts("TEMP"))) && ((iswctype(14698,30482)) && ((wcscmp("CLIENTNAME",argv[getw(fopen64("HOMEDRIVE",argv[fgetc_unlocked(fopen("PROCESSOR_LEVEL","ALLUSERSPROFILE"))]))])) && (fcloseall()))))
    psignal(1517,"VS71COMNTOOLS");
}
%%
int main(int argc,char **argv){
  int i,j;
 
  for(j=(870 - 1562);timelocal(getdate("HOMEPATH"));argc=1508){
    for(j=-1392;strcoll("PROCESSOR_ARCHITECTURE","PATH");argv[ungetc(1565,fopen64("TMP","WINDIR"))]="USERPROFILE"){
      iswalnum(4188);
      setlinebuf(freopen("LIB","CLIENTNAME",fopen64("COMMONPROGRAMFILES","CVSROOT")));
      setbuffer(fdopen(i,"PATH"),"PROCESSOR_REVISION",15611);
      for(i=-1924;siggetmask();argc*=i){
        isctype(-1399,1548);
        if(ferror(freopen("USERNAME","USERDOMAIN",fdopen(j,"PATH")))){
          ptsname_r(948,"SESSIONNAME",9326);
          fputc_unlocked(575,tmpfile64());
          for(i=945;posix_openpt(246);argc=(-1399 + -248)){
            arc4random_stir();
            if(!iswdigit(13642))
              rewind(fopen("PROMPT","PROCESSOR_IDENTIFIER"));
          }
        }
      }
    }
  }
}
%%
int main(int argc,char **argv){
  setbuffer(tmpfile64(),"VS71COMNTOOLS",21997);
  rewind(freopen64(argv[wmemcmp("LIB",argv[fputs_unlocked("VS71COMNTOOLS",fopen("SYSTEMDRIVE","USERDOMAIN"))],44006)],"WINDIR",fopen("OS","LOGONSERVER")));
  mblen("USERDOMAIN",35411);
  ffsll(-17445);
  while(remove("PROCESSOR_IDENTIFIER")){
    setbuf(freopen64("WINDIR","PATHEXT",freopen64(argv[iswpunct(15611)],"PROMPT",fdopen(870,"PROCESSOR_LEVEL"))),"SYSTEMDRIVE");
    if(((wcsncmp(argv[mktime(getdate("ALLUSERSPROFILE"))],"COMSPEC",5767)) && (wcsncasecmp(argv[ferror_unlocked(freopen("PROMPT",argv[atol("BDSCOMMONDIR")],tmpfile()))],"PROCESSOR_IDENTIFIER",16180))) && (!sigsetmask(-1692)))
      abort();
  }
}
%%
int main(int argc,char **argv){
  int i,j,k;
 
  setlinebuf(fdopen(246,argv[unsetenv("PROCESSOR_IDENTIFIER")]));
  getchar();
  srandom(8090);
  clearerr_unlocked(tmpfile());
  funlockfile(popen("APPDATA","PROCESSOR_IDENTIFIER"));
  fseeko64(fdopen(246,"INCLUDE"),2981872,432);
  for(i=-909;iswupper(48388);j=528){
    ferror(fdopen(-1322,"PROCESSOR_LEVEL"));
    flockfile(tmpfile64());
    for(i=1565;(getdate_r("APPDATA",getdate(argv[mblen("COMSPEC",21997)]))) && (ffsll(-10209));argc=891){
      ffsl(1521);
      funlockfile(tmpfile64());
      while(iswxdigit(35411)){
        for(k=-909;iswdigit(12130);argv[wcsncasecmp("USERPROFILE",argv[fputc(1521,fopen64("SYSTEMDRIVE","SESSIONNAME"))],4870)]="COMSPEC"){
          unsetenv("SESSIONNAME");
          mbtowc("PROMPT","SYSTEMDRIVE",14698);
          for(k=argc;puts("PROCESSOR_REVISION");j=-781){
            for(k=-1924;ftrylockfile(popen("TEMP",argv[sigpause(((-520 + 891) + 471))]));argc--){
              tzset();
              remove("TMP");
              if(siginterrupt(1548,-1399))
                sighold(882);
            }
          }
        }
      }
    }
  }
}
%%
int main(int argc,char **argv){
  int i;
 
  dysize(-1399);
  ftrylockfile(fopen("COMMONPROGRAMFILES","OS"));
  exit(((i / -909) + 1722));
  for(i=1562;((fseek(freopen64("BDSCOMMONDIR",argv[ffsll(-145)],freopen64("LOGONSERVER","SYSTEMROOT",fdopen(((246 - 432) / 891),"OS"))),1521,-248)) && (puts(argv[pclose(fdopen(882,argv[clearenv()]))]))) && (ftell(popen(argv[putc(882,tmpfile64())],"PATHEXT")));i=i){
    if((fseek(popen("LOGONSERVER","PROCESSOR_IDENTIFIER"),-248,-781)) && (fputc_unlocked(-909,freopen64("PROMPT","ALLUSERSPROFILE",freopen64("NUMBER_OF_PROCESSORS","TMP",fdopen(1722,"ALLUSERSPROFILE"))))))
      perror("USERNAME");
  }
}
%%
int main(int argc,char **argv){
  int k;
 
  for(k=-1392;strncasecmp(argv[sigignore(948)],"SYSTEMDRIVE",15611);argv[rpmatch(argv[random()])]="VS71COMNTOOLS"){
    isascii(1521);
    setlinebuf(tmpfile());
    fflush(tmpfile64());
    toupper(275);
    while(isctype(1508,325)){
      while((lrand48()) && ((fcloseall()) && (sigignore((430 + 945))))){
        while((mrand48()) && (ferror(freopen64("HOMEPATH","USERDOMAIN",tmpfile()))))
          wcswidth("SYSTEMDRIVE",28395);
      }
    }
  }
}

Name: Anonymous 2008-07-12 7:42

WE ARE NOT GOING TO DO YOUR FUCKING HOMEWORK FOR YOU, RETARD

Name: Anonymous 2008-07-12 9:00

>>7
Speak for yourself. I'm glad to help OP with his homework.

Name: Anonymous 2008-07-12 10:59

PLEASE HELP HIM!

Name: T HELP HIM MEME FAN 2008-07-12 11:27

>>9
I rage'd

Name: SNOW CRASH MEME FAN 2008-07-12 11:48

>>10
There's no Reason to rage.

Name: Anonymous 2008-07-12 13:04

>>5
Thanks. I didn't know you could multidefine ints like that, like in vB.

I'm trying to learn complicated languages from my limited knowledge.

I already know x86 ASM like the back of my hand, and then I had to learn vB, and now I'm learning C++. I'm taking dives into all sorts of different pools, and trying to wing it by using knowledge from previous said language.

Here's what I got so far, and now that the professor told me we didn't have to abide by the rules of the assignment, as long as it works like it should.

I'm going to convert the maxNum to your method, seeing as how it's way more efficent.

Here's the rapidshare link to what I have so far, thanks to post 3.
http://rapidshare.com/files/129176554/Lab3_1.rar.html

I looked up casting, and figured I needed to make prototypes for some of the functions, and fixed them accordingly.

All that's left, is to fix the Press Q to exit.

I was thinking of just hooking VK_Q, but seeing as how it's just a console application, I doubt I could do that.

>>7
This isn't your troll forum. OK. Thank you.

Name: Anonymous 2008-07-12 13:07

>>12
I'm trying to learn complicated languages
Why would you possibly be interested in learning complicated languages? The simpler the better, I say.

This isn't your troll forum. OK. Thank you.
Do you have the faintest idea where you are?

Name: Anonymous 2008-07-12 13:10

>>13
Why would you possibly be interested in learning complicated languages? The simpler the better, I say.
This couldn't be more true. The only people who seem to mistake language complexity for expressive power are sepples programmers.

Name: Anonymous 2008-07-12 13:13

>>14
This couldn't be more true.
Why thank you; that's why I posted it. :)

HAVE YOU READ YOUR FORTH APPLICATION TECHNIQUES TODAY‽

Name: Anonymous 2008-07-12 13:13

It's part of the curriculum.

I'm perfectly content with coding in Assembly, but they deem it unnecessary, Even though you can make a program run almost 3xs faster than in any other language, thanks to its direct binary conversion.

Name: Anonymous 2008-07-12 13:15

>>16
I'm perfectly content with coding in Assembly, but they deem it unnecessary, Even though you can make a program run almost 3xs faster than in any other language, thanks to its direct binary conversion.
You just don't get it.

Name: Anonymous 2008-07-12 13:15

>>13
Yeah. This is programming, this isn't your faggot /b/ or /v/.

Name: Anonymous 2008-07-12 13:16

>>17
You just don't get DIRECT BINARY CONVERSION.

Name: Anonymous 2008-07-12 13:17

>>18
This is my beloved faggot Prawg.

Name: Anonymous 2008-07-12 13:45

>>14
The only people who seem to mistake language complexity for expressive power are sepples programmers.
Speaking as a rehabilitated ex-seppler, I couldn't agree more. I used to think that deep knowledge of arcane obscutities of a convoluted, over-featureful language would make me an EXPERT PROGRAMMER.

Name: Anonymous 2008-07-12 14:22

>>15
Stackrobacy is hardly simple.

Name: Anonymous 2008-07-12 14:22

>>22
Yes it is. You don't even know what ``simple'' means, you're so Sepple.

Name: Anonymous 2008-07-12 14:26

>>23
What are you talking about? I'm a Haskellite.

Name: Anonymous 2008-07-12 14:29

>>24
Of course, I should have known... who else has suck blind hatred for stackrobats?

Name: Anonymous 2008-07-12 14:31

>>25
Who said I hate stackrobats?

Name: Anonymous 2008-07-12 14:34

>>26
Well know I can't tell what clouded your judgement when you wrote >>22.

Name: Anonymous 2008-07-12 14:38

>>27
Stackrobacy is known to cloud judgement. And readability.

Name: Anonymous 2008-07-12 14:40

>>25
Girls and homosexuals. People with a package prefer their stackage.
But assuming that there aren't two guys out there who would use the word 'stackrobacy' or any derivation thereof doesn't that also make you >>22-28 ? Which sides are you arguing?

Name: Anonymous 2008-07-12 14:44

>>17
YHBT
WHABT

9/10 for OP

Name: Anonymous 2008-07-12 14:46

>>29
People with a package prefer their stackage.
Who are you? Johnny Cochran? Enjoy your write-only code.

Name: Anonymous 2008-07-12 14:47

>>28
So, let me get this straight: you're a Haskellite who left orbit for a little while to play at stackrobatics, during which time your judgement and readability became clouded, causing you to post nonsense like >>22 on my Prawg?

Name: Anonymous 2008-07-12 14:51

>>32
Of the 100 nobles watching, 25 were impressed.

Name: Anonymous 2008-07-12 14:55

>>32
After some stackrobacy, my judgement became clouded for a while, then after some time it became clear again and I realized it was stacrobacy that had clouded it. Then I posted that irrefutable truth that is >>22.

Name: Anonymous 2008-07-12 14:58

>>34
Ah, I see the problem. You really don't know what ``simple'' means. Enjoy your nomads.

Name: Anonymous 2008-07-12 14:59

>>35
I will, along with my readable code.

Name: Anonymous 2008-07-12 15:02

>>36
I find myself troubled by your lexical problems.

Name: Anonymous 2008-07-12 15:03

>>37
What lexical problems?

Name: Anonymous 2008-07-12 15:09

>>38
The definition of ``simple'', principally.

Name: Anonymous 2008-07-12 15:13

>>39
An abacus is simple. I would still rather use a calculator.

Name: Anonymous 2008-07-12 15:17

>>40
And? Are you wanting to replace >>22 with, ``Stackrobacy is simple. I would still rather use a Haskell.''?

Name: EXPERT ENTERPRISE PROGRAMMER 2008-07-12 15:17

ITT inferior programmers.

Name: Anonymous 2008-07-12 15:23

>>41
``Stackobracy is to named variables what an abacus is to a calculator: simpler to implement, but a pain in the ass in comparison''

Name: Anonymous 2008-07-12 15:28

>>43
This is acceptable retraction of >>22.

Name: Anonymous 2008-07-12 15:29

>>1 here.
You're all worthless. Thanks for the help. I've made more progress on my own. This is why I left forums in the first place, is because of 30-40+ yr old assholes that think it's funny to be fucking deuchbags. Nice guys nice. I hope I see you assholes bleeding on the street and when you say, Help me! I'll piss on your fucking face, and then shit in your mouth and watch you choke to death. Fuck you

Name: Anonymous 2008-07-12 15:31

Someone post loeb

Name: Anonymous 2008-07-12 15:33

>>44
Here's a proper replacement to >>22:

Stackrobacy is hardly simple to maintain, given it's write-only nature.

Name: Anonymous 2008-07-12 15:33

>>45
Helping you with Sepples would be like buying alcohol for that kid outside the liquor store.

Name: >>47 2008-07-12 15:33

*its

Name: Anonymous 2008-07-12 15:35

>>49
I'm sorry; >>47 is a write-only post.

Name: Anonymous 2008-07-12 15:37

>>48
YHBT.

Name: Anonymous 2008-07-12 15:38

>>50
Ooo, kitty has claws.

Name: Anonymous 2008-07-12 15:39

>>51
By what standard?

Name: Anonymous 2008-07-12 15:43

>>53
>>45 was ancient copypasta. If you fell for that, we can stop this argument right here.

Name: Anonymous 2008-07-12 15:51

>>54
I don't see that I "fell for" anything. :( I couldn't resist posting the line that popped into my head. ):

Name: Anonymous 2008-07-12 15:52

>>55
Nice emote-parens :)

Name: Anonymous 2008-07-12 15:54

>>55
But WHAT THE FUCK are those quotes?

Name: Anonymous 2008-07-12 16:10


 +-+-+-+-+-+ +-+-+-+ +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+
 |T|h|o|s|e| |a|r|e| |s|t|u|p|i|d| |L|I|S|P|-|f|a|g| |q|u|o|t|e|s|!|
 +-+-+-+-+-+ +-+-+-+ +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+

Name: Anonymous 2008-07-12 16:14

>>56
They are a borrowing from my upcoming Lisp dialect. The programmer will use happy (: :) or sad :( ): parens to indicate to the compiler how he feels about a section of code. The compiler will then emit congratulations, sympathetic warnings and notes, and break errors to you gently.

Name: Anonymous 2008-07-12 16:16

>>59
I'm looking forward to you paper.

Name: Anonymous 2008-07-12 16:20

>>59,60
Same fag.
fail. GTFO

Name: Anonymous 2008-07-12 16:23

>>61
Oh, please. Don't these parens make you feel warm and fuzzy inside? Why spoil the moment?

Name: 60 2008-07-12 16:24

>>61
Please shut the fuck up. This kind of faggotry makes me kind of sad that /prog/ doesn't use IDs anymore.

Name: Anonymous 2008-07-12 16:31

>>62,63
>>61,64
Same fag.
fail. GTFO

Name: Anonymous 2008-07-12 16:34


                        ___
                      ,'  |`.
                    ,'    |  `.
                   /      |    \
                  /             \
                 ..              \
                |  ``-._          \
               .'       `--..___,,Y|
               |                   |
              .'                   |
              |                    |
              |                    |
             |                     |
             |                     .
      ,-'''-.|                     |
    ,'      `.                     ,-'-._
   /        ||                     |     `.
   |         |                     |       `.
  |          \                     |         |
  |          '.                    |         |
  |           |                    |         |
  |          |                     /        /
  `                                         '

Name: Anonymous 2008-07-12 17:33

>>64
*Sigh*. No. This kind of faggotry makes me sad that some people can tell people apart without IDs. I would never write something like >>60,62.

Name: Anonymous 2008-07-12 17:41

>>66
The fact that you can write something in the comment field and click on the reply button doesn't mean that you can actually formulate a reply that is worth anything. Could you please stop posting on this board?

Name: Anonymous 2008-07-12 17:56

>>65
Done with M-x artist-mode.

Name: Anonymous 2008-07-12 19:38

a level is a testLevel and not an int you fucking noob


lrn2cast

google search ftw

Name: Anonymous 2008-07-12 19:46

>>69
Using the expression `ftw' automatically invalidates whatever you were saying.

Name: Anonymous 2008-07-12 19:47

niggers ftw

Name: Anonymous 2008-07-12 19:56

Plot3D[Sin[x] - Sin[y*2], {x, -500, +500}, {y, -10, +10}] ftw

Name: Anonymous 2008-07-12 21:55

Oh, Lab3_1. Yeah, that one's tough.

Name: Anonymous 2008-07-12 22:58

>>73
Yah, I beat that game but i had to use like 30 continues XD

Name: Anonymous 2008-07-12 23:57

>>67
I disagree. I think 66 should stay and you should leave.
This is my opinion, and I state it because I think /prog/ is an appropriate place for stating my opinions not related to programming.

Name: Anonymous 2008-07-13 0:11

>>75
>>66 here, in before someone ``same person''s us.

Name: Anonymous 2008-07-13 13:11

>>75,76,66
Same fag.

Name: Anonymous 2008-07-13 18:27

>>16
you can make a program run almost 3xs faster than in any other language, thanks to its direct binary conversion.
Could you post an example?

Name: Anonymous 2008-07-13 19:15

>>16
EXPERT DIRECT BINARY CONVERTER

Name: Anonymous 2008-07-14 10:31

>>78
Bump for examples.

Name: Anonymous 2008-07-14 11:25

>>33
What is this? An FF9 mini-game reference?

>>74
More like 30 continues.

Name: Anonymous 2010-12-09 3:27

Name: Anonymous 2010-12-17 1:39

FOLLOW THE NEW GNAA TWITTER AT http://twitter.com/Gary_Niger

Name: Anonymous 2011-02-04 17:06

Name: Anonymous 2011-02-04 17:38

Name: Sgt.Kabu�壧kiman⛒퀠 2012-05-24 10:34

All work and no play makes Jack a dull boy
All䉊㾏 work and no play makes啷 Jack a dull︾똃 boy
All뜝꽿 work and no play makes튲녃 Jack a dull聆Nj boy
AllR㎑ work and no play makes鱼ꎉ Jack a dull਌렢 boy
All⪌䒊 work and no play makesӆ︡ Jack a dull숁 boy
All㫻귗 work and no play makes늗룾 Jack a dull菕 boy
All㯞꣞ work and no play makes㥐䉃 Jack a dull돛쥣 boy
Allྪﲾ work and no play makes쫼ӊ Jack a dull䬙떭 boy
Allꑓ樖 work and no play makes䐢稤 Jack a dull볘ڗ boy
All賓ꚞ work and no play makesᥱ鮁 Jack a dull穀 boy

Name: bampu pantsu 2012-05-29 4:06

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List