User Profile

Collapse

Profile Sidebar

Collapse
shing
shing
Last Activity: Jul 26 '09, 01:54 PM
Joined: Mar 12 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • shing
    started a topic Breaking an infinite loop
    in C

    Breaking an infinite loop

    How does a person break an inifinite for(;;) loop?

    -Thanks
    See more | Go to post

  • shing
    started a topic Two functions running at once.
    in C

    Two functions running at once.

    Is it possible for a C/C++ program to have 2 functions running at once? For example, the program holds a for() loop while it moves onto another function?
    See more | Go to post

  • shing
    started a topic Reading a line from a file.
    in C

    Reading a line from a file.

    I have been given a challenge by a friend. He has sent me a 570mb text file and I have to find out what is on line 230. The problem is as you probably realise, it is almost impossible to open this via notepad or other text editors because it will freeze. So I want to create a program that will read line 230. Is this possible?
    See more | Go to post

  • shing
    replied to Win-C++...%Number_Of_Processors%
    in C
    I am using a Windows based computer.
    See more | Go to post

    Leave a comment:


  • shing
    started a topic Win-C++...%Number_Of_Processors%
    in C

    Win-C++...%Number_Of_Processors%

    Hi! I'm currently trying to recreate my own version of CPUID's CPUz. Howewver, I'm unsure of how to implement this into my code...I tried using the system() call but then that shows this:

    '1' is not recognized as an internal or external command,
    operable program or batch file.
    1

    Can anyone show me how it can display the value "1" without showing the other stuff?
    See more | Go to post

  • shing
    replied to Text Parser
    in C
    What do u mean by that?
    See more | Go to post

    Leave a comment:


  • Make a clickable url which opens/creates 2 Firefox configuration files

    As a start page I usually have several of my bookmarks and a "Home portal". I have decided that I want a new feature.

    Code:
    <html>
    <script language="javascript">
    onclick="document.location.href="about:config"
    </script>
    </html>
    It doesn't appear to be working. What I want to do is make a clickable url that creates 2 pages...
    See more | Go to post

  • shing
    started a topic Text Parser
    in C

    Text Parser

    Can someone tell me what the program is dumping? Looks like some kind of memory code. Memory dump maybe?

    Code:
    #include <iostream>
    #include <fstream>
    using namespace std;
    
    int main () {
      ofstream myfile;
      myfile.open ("log.txt");
      myfile << "Writing this to a file.\n";
      myfile.close();
      cout << myfile;
      return 0;
    ...
    See more | Go to post

  • shing
    started a topic PHP Login script.
    in PHP

    PHP Login script.

    Can somebody just zip and upload a php login script for me and tell me how to use it. I'm sick of using MYSQL and getting errors and I don't understand and also finding code that doesn't work. I also don't have the time to learn PHP and figure it out for myself.
    See more | Go to post

  • shing
    replied to Encoder
    in C
    I don't quite understand the Standard template library. :(

    This is what I have currently:

    Code:
    #include <iostream>
    
    using namespace namespace_name std::map;
    {
      int <key_type, data_type, [comparison_function]>;
      int <string, char> encoder;
      
    }
    
    std::map <key_type, data_type, [comparison_function]>;
    
    std::map <string,
    ...
    See more | Go to post

    Leave a comment:


  • shing
    started a topic Encoder
    in C

    Encoder

    I made this python script with another guy a year ago

    Code:
    ### This is a dictionary...
    MyDict={'a':'$','b':'i','c':'q','d':'s','e':'w','f':'~','g':'d','h':'2',
            'i':'5','j':'6','k':'a','l':'g','m':'-','n':'j','o':'z','p':'%',
            'q':'h','r':'9','s':'f','t':'7','u':'+','v':'c','w':'0','x':'8',
            'y':'/','z':'x',' ':'*'}
    
    ## This is just to show the mapping of the 'encoding'
    ...
    See more | Go to post

  • shing
    started a topic Quadratics.
    in C

    Quadratics.

    Gah, another program I can't find my error in!

    Code:
    // Quadratic equation
    // (b + sqrt(b^2 - 4ac)) / 2a
    
    #include <iostream>
    
    using namespace std;
    
    int main()
    
    {
        
      int a;
      int b;
      int c;
      int d;
      int e;
      int f;
      int g;
    
      system("cls");
      cout << "--------------------------------------------------------------------------------";
    ...
    See more | Go to post

  • Code:
    //Voltage dividing circuit calculator!!!
    // In series!
    
    #include <iostream>
    #include <iomanip> 
    
    using namespace std;
    
    int main()
    
    {
        
      int i;
      int j;
      int k;
      int l;
      int m;
      int n;
      int o;
    
      cout << "Number of Resistors? \n";
      cin >> i;
      cout
    ...
    See more | Go to post

    Leave a comment:


  • shing
    started a topic Displaying Ohms Symbol in C++
    in C

    Displaying Ohms Symbol in C++

    I was told that to put the OHMS symbol into a C++ program you write "\u2126"?

    My program fed this to me: 

    What is the correct method? If anyone could show me how to show superscript and subscripts when running the C++ program, that would be great too (or maybe it's not possible to be shown?)
    See more | Go to post

  • Ok thanks for your help, i've cleaned up my code and it is functioning perfectly now. However, how do I tell the program to produce decimal numbers? (preferablly to 5 decimal places, rounded off)
    See more | Go to post

    Leave a comment:


  • Here is the modified code.

    Code:
    //Voltage dividing circuit calculator!!!
    // In series!
    
    #include <iostream>
    
    using namespace std;
    
    int main()
    
    {
        
      int i;
      int j;
      int k;
      int l;
      int m;
      int n;
      int o;
    
      cout << "Number of Resistors? \n";
      cin >> i;
    ...
    See more | Go to post

    Leave a comment:


  • Thanks, you have been a great help. One more problem though.

    Number of Resistors?
    1

    R1's resistance?
    142

    R2's resistance?
    22936723

    Voltage supply?
    04

    Voltage across R1 is:

    My program seems to be spewing out random numbers after each line even though i have typed nothing!
    See more | Go to post

    Leave a comment:


  • shing
    started a topic Physics! Oh no! (Error in program calculating resistance)
    in C

    Physics! Oh no! (Error in program calculating resistance)

    Can anyone tell me why I'm getting a "non-lvalue in assignment" error in my C++ program? Errors are at line 30, 31 and 32.

    Code:
    //Voltage dividing circuit calculator!!!
    // In series!
    
    #include <iostream>
    
    using namespace std;
    
    int main()
    
    {
        
      int i;
      int j;
      int k;
      int l;
      int m;
      int n;
    ...
    See more | Go to post

  • shing
    replied to Another string...
    BUMP HELP PLEASE need this for my perl program....
    See more | Go to post

    Leave a comment:


  • shing
    started a topic Another string...

    Another string...

    I would like to find a Python program that makes this appear:

    "Hello user 1, user 2, user 3, user 4"
    And it must go all the way to user 10000.
    See more | Go to post
No activity results to display
Show More
Working...