Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: c++ in highschool  (Read 5624 times)

0 Members and 1 Guest are viewing this topic.

computeruler

    Topic Starter


    Egghead

    Thanked: 63
    • Yes
    • Yes
  • Experience: Experienced
  • OS: Mac OS
c++ in highschool
« on: February 10, 2009, 06:45:29 PM »
i am going into 9th grade and I want to know if that class would be too hard?  Is c++ very hard?  I dont know wether c++1 and 2 would be too much for 9th grade?  Thanks

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: c++ in highschool
« Reply #1 on: February 10, 2009, 08:02:08 PM »
if their offering it for your grade they probably aren't going to do anything beyond your abilities.

For example, I doubt on the first day they'll give you a C manual, a linux manual, a linux distribution that doesn't match that manual with a version of GCC that doesn't match the one described in the manual, and a computer that barely runs it all, and ask:

"Alright, create a tree-based implementation of Evaluating String expressions. you have 20 minutes. GO!"

basically- it boils down to wether you meet all the prerequisites of the class- as an example, is there a plain C class available? if so go for that. Otherwise they are likely catering the class to allow for those that are unfamilar with the material.
I was trying to dereference Null Pointers before it was cool.

computeruler

    Topic Starter


    Egghead

    Thanked: 63
    • Yes
    • Yes
  • Experience: Experienced
  • OS: Mac OS
Re: c++ in highschool
« Reply #2 on: February 10, 2009, 08:24:37 PM »
should i take c++ 1 and 2 in 9th grade? Or do 1in 9th and 2 in 10th?  I want to do that but my parents wont let me and its making me mad because I want to do someting else becideds c++ 1 and 2

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: c++ in highschool
« Reply #3 on: February 10, 2009, 09:22:22 PM »
why are they making you do both ???
I was trying to dereference Null Pointers before it was cool.

Ashutosh32



    Intermediate

    Thanked: 1
    • Yes
    • Google
  • Experience: Experienced
  • OS: Windows XP
Re: c++ in highschool
« Reply #4 on: February 11, 2009, 08:40:00 AM »
I don't know what is C++ 1 & 2 but C++ is not as hard as it seems. Once you understand the basic concept, its just as simple as English.

So to start you off:
Code: [Select]
#include <iostream>

using namespace std;

int main(void)
{
     cout << "Hello World" << endl;

     return 0;
}
LOL

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: c++ in highschool
« Reply #5 on: February 11, 2009, 08:55:50 AM »
Code: [Select]
#include "stdafx.h"
#include "windows.h"
#include "iostream.h"
#import "G:\vbproj\vb\graph\dll\functionparser\release\baseparser.dll" raw_interfaces_only

int main(int argc, char* argv[])
{
   
   

    CoInitialize(NULL);
   
   
    BASeParser::_CparserPtr parseruse = NULL;
  HRESULT hr =
     CoCreateInstance( __uuidof(__CParser),
                      NULL,
                      CLSCTX_INPROC_SERVER,
                      __uuidof(__CParser),
                     (void**) &parseruse
                     );
 
  parseruse->put_Expression((BSTR)"sqr(2)^3");
  VARIANT* retval;
  retval=new VARIANT;
 
  parseruse->Execute(retval);
  cout<<retval->dblVal;
  CoUninitialize();




//__Cparser* useparse;
    //useparse = new __CParser();
   
return 0;
}


That's much simpler, LOL. my C++ program accessing my VB6 ActiveX Dll.
I was trying to dereference Null Pointers before it was cool.

computeruler

    Topic Starter


    Egghead

    Thanked: 63
    • Yes
    • Yes
  • Experience: Experienced
  • OS: Mac OS
Re: c++ in highschool
« Reply #6 on: February 11, 2009, 01:52:21 PM »
Ok I am only taking one c++ class now

Ironman



    Hopeful
  • Virtus, Veneratio, Fidelitas
  • Thanked: 15
    • Yes
    • My Personal Site
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: c++ in highschool
« Reply #7 on: February 11, 2009, 06:15:34 PM »
When I was in Highschool they had Computer Programming Honors which I took sophmore year and junior year I took AP Computer Science. we mostly learned Java, but we did some case studies in C++.


Ashutosh32



    Intermediate

    Thanked: 1
    • Yes
    • Google
  • Experience: Experienced
  • OS: Windows XP
Re: c++ in highschool
« Reply #8 on: February 12, 2009, 03:12:11 AM »
BC Programmer:
Is that an introduction program??  ???

If so then we would have very less C++ programmers!

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: c++ in highschool
« Reply #9 on: February 12, 2009, 03:59:54 AM »
BC Programmer:
Is that an introduction program??  ???

If so then we would have very less C++ programmers!

goodness no! actually... it doesn't even really work, since I couldn't be bothered to learn how to use a VARIANT in C++. So if the expression ends up returning a string or object it causes a page fault. Oh well.

As confusing as that may look, I have VB6 code that looks even worse...


Public Sub InvokeDynamic(ByVal onObj As Object, ByVal memberName As String, Arguments As Variant, retval As Variant)
    Dim ArgsPass() As Variant
    Dim AccessMode As InvokeKinds
    Dim i As Long
    Dim Current As Long
    Dim TryEm(10) As InvokeKinds, TryCount As Long
    Dim MemberInf As TLI.SearchItem
    Dim FuncFlags As InvokeKinds
    Dim IntInfo As TLI.InterfaceInfo, Getfirst As Boolean
    On Error Resume Next
    Set IntInfo = TLI.InterfaceInfoFromObject(onObj)
    'Set MemberInf=IntInfo.Members.GetFilteredMembers(False).Item(
     Set MemberInf = FindSearchItem(IntInfo.Members.GetFilteredMembers(False), memberName)
    If MemberInf Is Nothing Then
'        'check for existence of Get and Set prefixed names of this one... for example, if we were passed "Name" look for getName and setName.
'        If StrComp(left$(memberName, 3), "Set", vbTextCompare) = 0 And StrComp(left$(memberName, 3), "Get", vbTextCompare) = 0 Then
'        'check for set/Get permutations.
'        If Not IsArray(Arguments) Then
'            'try Get first.
'            Getfirst = True
'        Else
'            Getfirst = False
'
'        End If
'        If Getfirst Then
'            On Error Resume Next
'            InvokeDynamic onObj, "Get" & memberName, Arguments, retval
'
'
'        End If
'        If Not Getfirst Or Err <> 0 Then
'                Err.Clear
'                InvokeDynamic onObj, "Set" & memberName, Arguments, retval
'
'
'
'
'
'        End If
'
   
    'Execution Error: Method or Data member not found.
 
            On Error GoTo 0
            Err.Raise ExecuteErrors.Exec_UnsupportedOperation, "ModParser::InvokeDynamic", "Interface member name " & memberName & " Not present in class name " & TypeName(onObj)

    Else
        'The method DOES exist. good.
        'if we have an array of arguments, put them in reverse order for  the InvokeHook...
         If IsArray(Arguments) Then
            ReDim ArgsPass(UBound(Arguments))

            For i = UBound(Arguments) To 0 Step -1
               
                If IsObject(Arguments(i)) Then
                   
                    Set ArgsPass(Current) = Arguments(i)
               
                Else
                   
                    ArgsPass(Current) = Arguments(i)
               
                End If
               
                Current = Current + 1
            Next i
        End If
    'OK, if we have no parameters, it is POSITIVE that, if it is a property, it will be the retrieval of it.
    'with parameters, however, is a different story. we'll need to try a Put first, then a get if an error occurs.
   
   ' If IsArray(Arguments) Then
        'An Array/
        'possibly Get/Put/PutRef/Function.
        'INVOKE_PROPERTYPUT and INVOKE_PROPERTYPUTREF require arguments.
        If MemberInf.InvokeKinds And INVOKE_PROPERTYPUT And IsArray(Arguments) Then
           
        'try Good ol' put first...
            TryEm(TryCount) = INVOKE_PROPERTYPUT
            TryCount = TryCount + 1
       
        End If
        If MemberInf.InvokeKinds And INVOKE_PROPERTYPUTREF And IsArray(Arguments) Then
            TryEm(TryCount) = INVOKE_PROPERTYPUTREF
            TryCount = TryCount + 1
        End If
        If MemberInf.InvokeKinds And INVOKE_PROPERTYGET Then
            TryEm(TryCount) = INVOKE_PROPERTYGET
            TryCount = TryCount + 1
        End If
        If MemberInf.InvokeKinds And INVOKE_FUNC Then
            TryEm(TryCount) = INVOKE_FUNC
            TryCount = TryCount + 1
        End If
 
   
   
   
   
    End If
    Dim CurrTry As Long
   
    'Final Stage- Iterate through each item in TryEm from 0 to trycount and attempt an InvokeHook.
    For CurrTry = 0 To TryCount
        On Error Resume Next
        If UBound(ArgsPass) < 0 Then
           Err.Clear
           Call Assign(retval, CallByName(onObj, memberName, TryEm(CurrTry)))
           
        Else
            Call Assign(retval, TLI.InvokeHookArray(onObj, memberName, TryEm(CurrTry), ArgsPass))
           
        End If
        If Err = 0 Then Exit For
        Err.Clear
    Next
   
End Sub


-reduced in size to keep from taking up the whole page. the project that this is in clocks in at 15,000 lines, but I'm pretty sure there's a bit of dead-code in there somewhere.


Ahem... anyway...


As long as you stay away from COM, C++ is really no trouble at all. It's when you start doing gross stuff like my silly little sample that it get's tricky. In fact, I gave up on that one ages ago- I found it easier to find out how to make a console program in VB6...
I was trying to dereference Null Pointers before it was cool.

computeruler

    Topic Starter


    Egghead

    Thanked: 63
    • Yes
    • Yes
  • Experience: Experienced
  • OS: Mac OS
Re: c++ in highschool
« Reply #10 on: February 12, 2009, 04:50:41 PM »
i just found my vb book. 

ultimatum



    Intermediate
  • Thanked: 3
    Re: c++ in highschool
    « Reply #11 on: February 14, 2009, 02:39:43 PM »
    Take only one class, they'll teach you the basics starting from scratch. Because you're in grade nine they know there is no prerequisites to take before that, so you'll start with the basics. You're lucky you have C++ class in your high school, I only had Pascal and Java which became available a little bit to late for me.
    Its not what you know, its what you can do that counts!

    Bones92



      Hopeful

    • Website Designer and Microcontroller Programmer
    • Thanked: 3
      • PIC Programming New Zealand
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 7
    Re: c++ in highschool
    « Reply #12 on: February 14, 2009, 03:27:39 PM »
    You're lucky to have any programming courses in your school. We don't have any - I have had to self-teach myself since i was seven. Useless northland schools...

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: c++ in highschool
    « Reply #13 on: February 14, 2009, 06:38:37 PM »
    my school had "Information technology" for grades 10,11, and 12- (11 and twelve were mostly in Visual Basic, with some Flash thrown in for good measure), as well as AP CS 12, which I myself took in grade 11, and did nothing at all in and got 100%. Actually, come to think of it, I didn't do anything in any of those computer courses after the first day or so of IT11... technically I was silently upgraded to IT12 and even then I was far better at VB then anybody else in the school of 1400.

    I credit all this to my 386 and VB2 during summer holidays one year...


    Now the poor bastards there are using VS .NET... I actually visited there once, and I had to supress sarcastic laughter when they asked wether I used VB .NET.

    "As my main language. I find the .NET framework clunky and an unnecessary distributable, and the CLR to be a cheap copy of the Java VM. I prefer VB Classic. yourself?"

    That person spent the rest of that period trying to think of something that .NET could do that I not only couldn't do in VB6 but also hadn't done - didn't go over in his favour...
    I was trying to dereference Null Pointers before it was cool.