• untorquer@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    2 days ago

    Something like

    int *a = new int(10)
    
    Int*b = null
    
    While *b !=10 { b = rand(); a=new int(10)}
    
    Return *b
    

    I haven’t coded recently enough in c/c++ to remember syntax but the concept might work eventually if you’re lucky and have enough memory… Might need a time variant seed on the rand()…