User Profile

Collapse

Profile Sidebar

Collapse
manontheedge
manontheedge
Last Activity: Jan 15 '14, 03:33 PM
Joined: Oct 8 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Ugh, yeah, that would be what I'm looking for. I apparently was trying to complicate things. Thank you.
    See more | Go to post

    Leave a comment:


  • manontheedge
    started a topic How to use Windows command-line commands in code
    in C

    How to use Windows command-line commands in code

    In Windows, if you open a command prompt, there are a bunch of keywords like, 'chdir', 'copy', ...

    What I'm trying to figure out is how to use that COPY command in c++ code. I want to use the COPY command with the options (/a, /b, ...).

    How do I do this?

    Every time I search for this on Google, the results are no where close to what I'm looking for. Any help is appreciated.
    See more | Go to post

  • manontheedge
    replied to Compile c file in Windows
    in C
    have you tried copying the file, and then in the copy, deleting everything except for whatever operating system you are on. So, if you are on Windows, only keep the Windows part in the file ...

    Code:
    CC = i586-mingw32msvc-gcc 
    CFLAGS ?= -O2 -Wall 
    hid_bootloader_cli.exe: hid_bootloader_cli.c 
        $(CC) $(CFLAGS) -s -DUSE_WIN32 -o hid_bootloader_cli.exe hid_bootloader_cli.c -lhid -lsetupapi 
        
    clean:
    ...
    See more | Go to post

    Leave a comment:


  • manontheedge
    replied to Why is this simple program not working?
    in C
    the problem is in the line

    Code:
    char *s="hello";
    when you create a dynamic array, as you have done with

    Code:
    char* s
    you need to reserve space in memory for it. You do that like this ...

    Code:
    char* s = new char[sizeof("hello")];
    then, you can't assign a string of characters ("hello") to a dynamic char array using the equals sign. You have to...
    See more | Go to post

    Leave a comment:


  • one fstream member instead of ofstream and ifstream - acceptable practice?

    I have a class that does file handling. This class will be inherited and perform several file handling functions. So, I want private members for fstream. I originally thought of making two members - one for ifstream, and one for ofstream, but am now considering just having one member and making it an fstream.

    From a design perspective, is this generally accepted, or is it considered bad form?

    so, instead of
    ...
    See more | Go to post

  • manontheedge
    replied to read in video file into Bitmap class
    Thank you for the links. I will take a look at both of them.

    I find it hard to believe that this hasn't been done plenty of times by others, but apparantly if it has, it's difficult to find just searching around.

    If I get it figured out, I'll post back here. When I searched Google, I actually found a post I made 2 or 3 years ago with a similar question, that I never did get answered. Anyway, I'll look at those links,...
    See more | Go to post

    Leave a comment:


  • manontheedge
    replied to read in video file into Bitmap class
    Once I've loaded all of the frames, I'm going to manipulate particular frames, and leave them as images.

    I understand what your saying about a video not being like an image. But, I've used the Bitmap class to go through "video dumps", where a video is broken up into a huge file of bytes, and you have to read the headers and basically work with it, and break it out to one frame at a time. I thought the same could be done...
    See more | Go to post

    Leave a comment:


  • manontheedge
    started a topic read in video file into Bitmap class

    read in video file into Bitmap class

    I've used the C# Bitmap class to manipulate images before, so I tried to do this with videos. It's not working. Is it possible to do a "Bitmap bm = new Bitmap("...\som eVideo.MOV")"? When I try, it crashes when getting to that line, giving the error that the parameter is not valid. So, apparently it doesn't like the ".mov".

    I'm trying specifically to read in a video file recorded on a digital camera,...
    See more | Go to post

  • manontheedge
    started a topic creating multiple instances of a class dynamically
    in C

    creating multiple instances of a class dynamically

    I'm trying to create multiple instances of a class dynamically. For example ...

    Code:
    Class A
    {
    ...
    ...
    };
    Code:
    Class B
    {
        B( int value )
        {
            for( int i = 0; i < value; i++ )
            {
                // I THINK THIS IS RIGHT
                m_a[i] = new A();
            }
        }
        ...
        ...
    private:
    ...
    See more | Go to post

  • Well, what I'm working on, it's just something I was playing around with, doing some message hiding inside images. I've achieved this with bitmaps, but wanted to do it with jpeg files simply because they're so commonly used, and realised the compression issue, and now am just wondering if there is a way around it somehow.

    I actually discovered "EncoderParamet er" which you can use to compress LESS, but not avoid it entirely....
    See more | Go to post

    Leave a comment:


  • Is it possible to modify a .jpg's bits, and not lose those changes to compression?

    I'm able to read in a .jpg, alter pixel values, and save it again, as a .jpg, but the image gets compressed when saved. So when I read it back in, the values are not what I set them at, because of the compression when being saved, and I need the bits, every one of them.

    What I want is to be able to change individual bits inside pixels and save those changes, so that I can read the bit values back in. This works fine with bitmaps,...
    See more | Go to post

  • Thanks for the reply.

    What I'm working with are video dumps. I'm looking at hundreds of individual frames, so the format of one type of file is 14 bit grayscale. I've figured out reading all different odd file types, and then converting each frame to 24 or 32 bit Bitmaps ( 8 bits/color ) in windows forms, but now I need to deal with one that's 14 bit monochrome. However, when I create a new Bitmap and fill the values (using SetPixel),...
    See more | Go to post

    Leave a comment:


  • manontheedge
    started a topic How to create and display a 48-bit image?

    How to create and display a 48-bit image?

    I've been creating 24-bit images ( 8 bits per pixel ) from raw data, which works fine using the Bitmap class.

    But now I need to create a 48-bit image. The problem is that apparantly only 8 bits per color are actually being used when creating it, so I'm losing a great bit of detail in each pixel. When I go to use "SetPixel", it gives the message, "the value is limited to 8 bits". I need all 16 bits.
    ...
    See more | Go to post

  • Just a follow up for anyone who may have a similar problem and see this post ...

    The motherboard was dead. I took my computer to GigaParts, paid them $35 to tell me that my motherboard was dead, then got a new motherboard off newegg.com and the computer works great now.

    By the way, GigaParts told me it would cost $400 plus to replace the motherboard, get a new case, and new RAM. They're theives! New case!? New RAM!?...
    See more | Go to post

    Leave a comment:


  • manontheedge
    replied to how to return an array from the function
    in C
    this code below will do what you're trying to do. I ran it in a C++ compiler just to make sure it was working. I tried to comment to help you out. Take a look, hope this helps ...

    Code:
    #include<iostream>
    #include<stdio.h>
    
    //int arr(int *n)
    void arr(int a[], int size) // need to pass an array AND the size of it
    {
    	//int a[20]; don't need this
    	printf("ENTER THE
    ...
    See more | Go to post

    Leave a comment:


  • Not sure what processors will work with your mother board, but it will be specific processors ( so a few types of single core, a few types of dual core, ... will work, but only some, you should be able to google what specific processors will work with your board ). Also, from what you say you do, you're probably going to want a good graphics card too.
    See more | Go to post

    Leave a comment:


  • Perhaps your computer is getting overloaded. What applications are running when this happens? How much free space is on your hard drive? What size and type of RAM do you have? How many internet tabs do you have running? Are you running antivirus software?

    It sounds to me like your computer is trying to do too many things at once.
    See more | Go to post

    Leave a comment:


  • manontheedge
    replied to How to optimize a slow PC
    I realize this is from a couple of months ago, but maybe this will help someone.

    Just because your computer is slow, that doesn't mean you have a virus. What it usually means is that your hard drive is clogged with a bunch of stuff. Do you have a lot of pictures and movies on your computer? Do you download lots of software or install lots of applications that run all the time? Have you not defragmented your hard drive in a while?...
    See more | Go to post

    Leave a comment:


  • Motherboard or CPU dead? or something else?

    I have a computer that would do nothing when turned on, including giving no beep codes. Everything seems to be getting power - the CD drive, CPU fan, and hard drive all start spinning. I disconnected everything from the motherboard ( it's an ACER N1996 ) including the RAM, CPU fan, all drives, ... and still get nothing. All that's left is the MB, power supply, CPU, and MB battery. I replaced the MB battery, and it made no difference. Still not getting...
    See more | Go to post

  • manontheedge
    started a topic Multicasting - how to block a receiver

    Multicasting - how to block a receiver

    I'm working on creating a multicasting project in C# ... I've got groups for different clients to be in, where they can only talk to each other, and understand the setup, but I'm having a problem that I can't find a solution to -- everyone who sends something gets it right back ( since I need the send/receive port to be the same within each group ). I'm trying to block the sender from receiving what they have just sent ( but continue to receive...
    See more | Go to post
No activity results to display
Show More
Working...