Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Question about classes

Question about classes

Scheduled Pinned Locked Moved Managed C++/CLI
questiontutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    morisson_c
    wrote on last edited by
    #1

    Hello everyone, I'm want to build a Gpib drivers for an Agilent instruments. Now...I want it to be a "class a-like" driver , for example if the user wants to set a center frequency of 100MHz in a spectrum driver it will look like this: ... // defenition Agilent_Spectrum spectrum; // initialization spectrum.init(9); // send a frequncy spectrum.frequncy.center.MHz=100; ... The question is : can I do it without using classes ? :rolleyes:

    C C 2 Replies Last reply
    0
    • M morisson_c

      Hello everyone, I'm want to build a Gpib drivers for an Agilent instruments. Now...I want it to be a "class a-like" driver , for example if the user wants to set a center frequency of 100MHz in a spectrum driver it will look like this: ... // defenition Agilent_Spectrum spectrum; // initialization spectrum.init(9); // send a frequncy spectrum.frequncy.center.MHz=100; ... The question is : can I do it without using classes ? :rolleyes:

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Using just plain C you can do whatever you want. It's enough to you, isn't it? :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      1 Reply Last reply
      0
      • M morisson_c

        Hello everyone, I'm want to build a Gpib drivers for an Agilent instruments. Now...I want it to be a "class a-like" driver , for example if the user wants to set a center frequency of 100MHz in a spectrum driver it will look like this: ... // defenition Agilent_Spectrum spectrum; // initialization spectrum.init(9); // send a frequncy spectrum.frequncy.center.MHz=100; ... The question is : can I do it without using classes ? :rolleyes:

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        The answer would be, if you're not using classes, you're probably not using C++/CLI, so you must be asking in the wrong forum.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        M 1 Reply Last reply
        0
        • C Christian Graus

          The answer would be, if you're not using classes, you're probably not using C++/CLI, so you must be asking in the wrong forum.

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          M Offline
          M Offline
          morisson_c
          wrote on last edited by
          #4

          (I do work in c++, and I do know how to use classes...classes is the answer for my problem but it's a lot of work). I didnt say that Im not using classes...I said I want to do it without using classes...meaning: the question is "can I do it in a simple and more primitive way ?" maybe something like "namespace" or structures ? :rolleyes:

          C 1 Reply Last reply
          0
          • M morisson_c

            (I do work in c++, and I do know how to use classes...classes is the answer for my problem but it's a lot of work). I didnt say that Im not using classes...I said I want to do it without using classes...meaning: the question is "can I do it in a simple and more primitive way ?" maybe something like "namespace" or structures ? :rolleyes:

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Yes, I can see that you're working in C++, but, again, this is the C++/CLI forum, and you are not using C++/CLI as far as I can see. Of course you can write anything you like without using classes, just like I can walk to the store instead of driving. You are not forced to use the tools that make yuor job easier. Oh, and a struct IS a class, they are the same thing, the only difference is the default access modifier.

            Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups