CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: jefranki

Page 1 of 5 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    4
    Views
    10,037

    Re: Zeller's Congruence

    All the variables are already ints so using the floor() function is redundant. You also might want to look into putting some error guards in against invalid dates like February 29 in a non-leap year,...
  2. Replies
    21
    Views
    7,036

    Re: Performance enhancement

    And let's also not forget the simple, "Whoops! I forgot to allocate enough memory to my application and now it's paging to the hard drive constantly."
  3. Replies
    8
    Views
    1,059

    Re: Cross platform comparison

    If you are programming something especially processor intensive, you might notice a difference based on CPU Architecture (PowerPC vs. Intel vs. MIPS, 32-bit vs. 64-bit, etc) even if they are all...
  4. Replies
    15
    Views
    1,519

    Re: Pointer Problem

    From what you posted earlier: Binary binarys[99]; This means you defined binarys as an array of Binary objects.

    Where you may be getting confused when the technical detail gets mentioned that...
  5. Replies
    15
    Views
    1,519

    Re: Pointer Problem

    I'm not sure it will get rid of your problems, but I noticed some design issues:

    1. You have using namespace in your header files. This should only be in your .cpp files. This can cause a myriad...
  6. Replies
    15
    Views
    1,519

    Re: Pointer Problem

    My gut feeling is that you are misusing the * operator, but I can't say for sure without more information.

    We can likely help you if you post how binarys and binaryid are defined (your actual...
  7. Thread: int96 type

    by jefranki
    Replies
    13
    Views
    2,370

    Re: int96 type

    You say these are IDs?

    Will you be performing any math on these? Is there a requirement for your numbers ever to be output as base-10?

    If your answer is "no" to both, your solution is alot...
  8. Replies
    4
    Views
    1,661

    Re: Programmer typing style

    If you are still using "hunt and peck" or constantly stare at the keyboard while typing, it would we a good idea to take a typing class, or get some software for the same purpose.

    Other than that,...
  9. Re: Header files w/ c++, specifically data structures

    As of your last posting, there are several things wrong.

    First of all, you are mis-using the extern keyword. extern does not define a variable, it only lets you re-use a global declared in some...
  10. Replies
    21
    Views
    6,037

    Re: Theory Question: Global Variables

    andrey_zh was just quoting Google's in-house coding standards, which are about good coding practices (especially in a large team / multiple-programmer setting), not about what the language does or...
  11. Replies
    11
    Views
    1,608

    Re: Testing primality of long doubles

    It's not generally a good idea to test floating point numbers for primality because of round off error. To illustrate:

    In a 32-bit floating point number, the maximum value you can exactly convert...
  12. Replies
    3
    Views
    3,596

    Re: Mathematical concept behind 3D-Trackball

    After perusing that .c file, the comments especially, I get the impression that they are using a sphere-proper for generating the z-coordinate when the (x,y) is close to the center of the sphere, but...
  13. Thread: Java to C++

    by jefranki
    Replies
    33
    Views
    4,297

    Re: Java to C++

    Here's a couple quick examples to illustrate some differences between C++ and Java that might help you with your initial questions. I'll use Java classes, and C++ structs for the examples, for...
  14. Thread: Error C2061

    by jefranki
    Replies
    3
    Views
    4,866

    Re: Error C2061

    Do all your header files have guards around them? By guard, I mean something like:


    #ifndef SOMEFILE_H
    #define SOMEFILE_H

    // all the usual header file stuff should go in here
    // between the...
  15. Replies
    5
    Views
    2,286

    Re: Destop app: C# or Java (swing)

    In the case of something like a web browser, you will have some common components that operate the same at the C++ level regardless of OS Platform, things like text-parsing (html, javascript, etc.)....
  16. Thread: Help Request

    by jefranki
    Replies
    5
    Views
    827

    Re: Help Request

    I'm guessing you have large program that is always doing something, and has a main loop that only breaks on some particular user input?

    I'd suggest just look into the data structures and functions...
  17. Replies
    5
    Views
    2,555

    Re: Counting number of words + occurrences

    First of all, you are completely misusing switch-case.

    Example of how it should be used:


    if(someVariable==1)
    {
    //do Something #1
    }
    else if(someVariable==2)
  18. Replies
    8
    Views
    2,495

    Re: Modular Arithmetic

    If you need to get your head around this stuff, just make up some simple problems and work them by hand in -fraction- form.

    i.e. 7 divided by 2 == 7/2 (improper fraction) == 3 1/2 (mixed number)...
  19. Replies
    9
    Views
    1,452

    Re: Squared Digit Length

    You need nested loops here.

    Set your result initially to your n. Then have an outer loop using while(result/10 > 0). The inner loop should do the brunt of the math using % and / starting with the...
  20. Replies
    5
    Views
    642

    Re: Help Please before i go crazy!!!!

    As supplied, this code is equivilent to:



    #include <iostream>
    using namespace std;

    int main()
    {
    int i, j;
  21. Replies
    10
    Views
    932

    Re: syntax error : missing ';' before '*'

    I noticed that you have using namespace std; in your header files, that can cause problems as well. using namespace whatever; should only be in your implementation files.

    Similarly, you have...
  22. Replies
    3
    Views
    4,465

    Re: Horizontal output?

    Do your loops so you iterate by row and by die number, with an array holding the roll values. Make a function that will draw a given row (but not every row) for a given roll value.

    Maybe this code...
  23. Thread: magic square

    by jefranki
    Replies
    6
    Views
    1,792

    Re: magic square

    Whether you should multi-thread or not would depend on the hardware you are targeting.

    If you are targeting a single-core, non-hyperthreaded processor, you are going to take an extra CPU hit...
  24. Replies
    21
    Views
    2,302

    Re: Prime Numbers Help?

    Also note:


    anything%0; //divide by zero error
  25. Replies
    9
    Views
    1,139

    Re: operator++ with templates

    I opened the editor before your post came up. At any rate, I missed the prefix vs. postfix element.
Results 1 to 25 of 102
Page 1 of 5 1 2 3 4





Click Here to Expand Forum to Full Width

Featured