User Profile

Collapse

Profile Sidebar

Collapse
cosmos22
cosmos22
Last Activity: Mar 10 '08, 07:40 PM
Joined: Feb 17 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cosmos22
    started a topic Uploading to a FTP server? My code is wrong...
    in C

    Uploading to a FTP server? My code is wrong...

    Hi.

    I'm designing something that uploads files to an FTP server of the users choice, so they quickly upload things and access them as a way of backing up files, almost.

    I would like to upload the file on the C: called pic.jpg as a test, but I've been having some problems...


    I haven't filled it out yet, but I'm using the FTP provider tripod:

    ftp.tripod.com

    Thanks, everyone......
    See more | Go to post

  • Help... Checking if an executable already exists in startup folder...

    Hello, I have programmed some coding that copies my .exe to the start up folder, so it will execute on start up. I plan to use this to prompt the user of information, once I can get by this problem:

    As the .exe file contains info about copying itself to the folder, as it runs on start up, it will attempt to copy again, resulting in an error message.

    Can anyone suggest some source code that will be included in the .exe...
    See more | Go to post

  • cosmos22
    started a topic How to use void HideConsole() ??
    in C

    How to use void HideConsole() ??

    The following code for me doesn't work, I want to hide the console window in the easiest possible way:

    void HideConsole();
    {
    ShowWindow(GetC onsoleHwnd(),SW _HIDE);
    }


    I used this ref.
    http://www.scribd.com/doc/951453/win32gui


    It states GetConsoleHwnd( is undeclared, any ideas?
    void HideConsole(); on its own doesn't work at all...


    Thanks...
    See more | Go to post

  • cosmos22
    replied to Making two infinite loops inside the other?
    in C
    while(1)
    {
    DWORD d = 0;
    DeviceIoControl (hcd, IOCTL_STORAGE_E JECT_MEDIA, NULL, 0, NULL, 0,
    &d, NULL);

    DeviceIoControl (hcd, IOCTL_STORAGE_L OAD_MEDIA, NULL, 0, NULL, 0,
    &d, NULL);
    }


    The while condition
    while(1)
    {
    code
    }
    Makes it loop again and again....
    See more | Go to post

    Leave a comment:


  • cosmos22
    started a topic Making two infinite loops inside the other?
    in C

    Making two infinite loops inside the other?

    The following code below shows an example of a infinite while loop. I was wondering how I would incorperate another infinite loop into this , without ruining the actions inside of it. I would like to use this in the second loop

    SetCursorPos( X, Y );

    Thank you.



    Code:
    while(1)
    {
       DWORD d = 0;
       DeviceIoControl(hcd, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &d, NULL);
    ...
    See more | Go to post
    Last edited by Ganon11; Feb 19 '08, 07:27 PM. Reason: Please use the [CODE] tags provided.

  • cosmos22
    replied to My loop doesn't work, need some guidance..
    in C
    I've defined d, so is it not possible to implement a loop in this program using what I've made? How would I go about using the <tchar.h> variable?...
    See more | Go to post

    Leave a comment:


  • cosmos22
    started a topic My loop doesn't work, need some guidance..
    in C

    My loop doesn't work, need some guidance..

    The loop below doesn't work, I was wondering if anyone can help me. I need to create an infinate loop around the while condition.
    The error states that 'd' is undeclared

    Thank you all :)

    [code=cpp]
    #include "windows.h"
    #include "winioctl.h "
    #include <string>
    #include <iostream>
    using std::string;
    using namespace std;

    ...
    See more | Go to post
    Last edited by sicarie; Feb 19 '08, 04:36 PM. Reason: Code tagsa re [code=cpp] and after your code [/code]. Please use them. They want to be used. They like to be used.

  • cosmos22
    started a topic How to delete a folder?
    in C

    How to delete a folder?

    Hello, I have recently been able to delete files using this code(With the aid of others from the forum) And I was wondering how you can change this, to suit deleting a folder

    #include <iostream>
    #include <windows.h>
    int main(int argc, const char * argv[])
    {


    // Get a pointer to the file name/path
    const char * pFileToDelete = "c:\\Progra m Files\\myfile.t xt";...
    See more | Go to post

  • cosmos22
    started a topic Deleting a file? Need help...
    in C

    Deleting a file? Need help...

    Hello, I am pretty new to C++, and I have a question:

    I am, and have been using Dev-C++

    I used this code, to delete a text file on my desktop. The first time around, it worked perfectly. Given the file example name of "dafile".


    #include <stdlib.h> // needed to use system() function

    int main() {
    system("del dafile.txt");
    return 0;...
    See more | Go to post
No activity results to display
Show More
Working...