cambalinho 142 Practically a Posting Shark

seen some tutorials i found the Z-order and test if i need draw the line or not:
http://www.ece.ubc.ca/~saifz/eece478/course/hidden.pdf
but i need more: imagine if the plane is more big than the camera, how can i draw it?

cambalinho 142 Practically a Posting Shark

rproffitt: the code is Visual Basic 6... so works fine with Visual Studio 6.0
thanks so much for all.. i will try more search

cambalinho 142 Practically a Posting Shark

i'm sorry rproffitt, but is there a tutorial for i see more about it?
even trying using keywords, on google, i'm getting trouble to find something about it :(

cambalinho 142 Practically a Posting Shark

i'm learning Math for 3D...
for now i can draw a plane and convert 3D to 2D(the screen is 2D):

Private Function ConvertPositon3DTo2D(Position As Position3D, World3DSize As Size3D) As POINTAPI
    Dim ConvertedPosition As POINTAPI
    Dim PosZZDepth As Long

    PosZZDepth = Position.Z + World3DSize.Distance

    If (PosZZDepth = 0) Then PosZZDepth = 1 'avoiding division by zero
    Dim Width As Double
    Dim Height As Double
    Width = World3DSize.Width / 2
    If (Width = 0) Then Width = 0
    Height = World3DSize.Height / 2
    If (Height = 0) Then Height = 0
    ConvertedPosition.X = (Position.X * World3DSize.Distance / PosZZDepth) + Width
    ConvertedPosition.Y = (Position.Y * World3DSize.Distance / PosZZDepth) + Height
    ConvertPositon3DTo2D = ConvertedPosition
End Function

Private Sub DrawPlane(Position As Position3D, Size As Size3D, Rotation As Angle3D, WorldSize As Size3D, color As ColorConstants)
    Dim Points(4) As POINTAPI

    Dim NewPoint As POINTAPI

    Dim NewPosition3D As Position3D
    Dim RotatedPosition As Position3D
    Dim DestinyPosition As Position3D
    Static FixedPoint0(4) As Position3D
    Dim sizeD As Size3D
    Dim temp As Double
    FillSize3D sizeD, 0, 0, 0

    'FillPosition3D RotatedPosition, Position.X + Size.Width / 2, Position.Y + Size.Height / 2, Position.Z + Size.ZDepth / 2
    With Player1.Position
       FillPosition3D RotatedPosition, .X, .Y, .Z  'Camera Position
    End With

    If (IsCollision3D(camera1.Position, camera1.Size, Position, Size) = False) Then Exit Sub
    'Floor:
    'Vector1
    FillPosition3D NewPosition3D, Position.X, Position.Y, Position.Z
    NewPosition3D = Rotate(NewPosition3D, Rotation, RotatedPosition)
    If (IsOnCamera(NewPosition3D, sizeD, camera1.Position, camera1.Size) = True) Then
        FixedPoint0(0) = NewPosition3D

    Else
        NewPosition3D = FixedPoint0(0)
    End If
    NewPoint = ConvertPositon3DTo2D(NewPosition3D, camera1.Size)

    Points(0) = NewPoint

    'Vector2
    FillPosition3D NewPosition3D, Position.X, Position.Y, Position.Z + Size.ZDepth
    NewPosition3D = …
cambalinho 142 Practically a Posting Shark

how can i print 3 values(without knowing their string\number size) in same column using cout?
i'm using these code:

cout <<"\n" << "show tokens\n";
        for(unsigned int i=0;i<Tokens.size(); i++)
        {
            cout << "Token: " << Tokens[i].Token <<right<<setw(20-Tokens[i].Token.size())<< "Type: " << Tokens[i].Type <<setw(40) << fixed << "Position Line: " << i<<"\n";
        }

but i know the 'token' size, but not the type size. so what you can advice me?

cambalinho 142 Practically a Posting Shark
  • i run my compiled program;
  • the program is executed without a problem..
  • when i create(from my program) the text file, the WD delete my text file.
    the text file is only for get C++ code lines... nothing more.

Reverend Jim: "As I said before, typically UAC intercepts any attemots to write to protected folders."
if i use a resource file with name version and more(speaking about my compiled program), will resolve the problem?

rproffitt commented: Please tell a lot more. It hampers getting to what's going on. And no. +15
cambalinho 142 Practically a Posting Shark

after i disable the folder protection, on WD, the file isn't deleted.
is the only solution that i have now... but, like i said, isn't a solution on another computer.. unless we do the same

cambalinho 142 Practically a Posting Shark

thanks to you i have learned more... thank you so much for all

cambalinho 142 Practically a Posting Shark

seems that i get your point.. i'm trying search if GNU have that option... but i must search more(yes i don't use Visual Studio).
thank you so much for all

cambalinho 142 Practically a Posting Shark

ok maybe you have right.. i'm using on my Documents folder... the text file is created close the exe file... and maybe you have right about it.
just for test: what folders i can use without WD don't complain?

cambalinho 142 Practically a Posting Shark

i'm using Code Blocks with GNU compiler...
my program create a text file.. but the created file is deleted by Windows Defender...
i can create an exception on Windows Defender for my program... but when i use my program on another pc, the problem remains :(
on compilation, is the any flag that avoid that problem?
or i must use a win32 function for tell the Windows Defender that the text file is safe?

cambalinho 142 Practically a Posting Shark

i'm creating a program using Code Blocks with GNU\GCC compiler.
i'm using Windows 10 with Windows Defender.
my program create a txt files(instead a text files, we can speak binary files too), but the Windows Defender can delete the file(and i have sure), for avoid these problem i must disable the Windows Defender.
my question is: can i compile my program(even using a compiler\linker flag) for avoid the Windows Defender problems?
ok.... i can disable the Windows Defender and make an exception.... but if i share my program, the new user will get the same problem :(
can anyone advice me more?

cambalinho 142 Practically a Posting Shark

Husoski: "No, %s scanning stops on any whitespace, not just a newline. Use %255[^\n] to include any character except a newline."
the '[^\n]' is ANSI or GNU compatible? and strange, in these case, you don't use 's'.
Note: i'm sorry, but i can't vote your comment

cambalinho 142 Practically a Posting Shark

Husoski: using

scanf("%255s", opinions);

accept space\tab too?

Husoski commented: No, %s scanning stops on any whitespace, not just a newline. Use %255[^\n] to include any character except a newline. +0
cambalinho 142 Practically a Posting Shark

thank you sou much for all

cambalinho 142 Practically a Posting Shark

about windows 10... is what i'm new... sorry i

cambalinho 142 Practically a Posting Shark

thank you so much for alll.. thank you.
next question:
Windows Defender: a program can use more than 1 exe, that's normal... but imagine that program(even the next exe from that program) need create a file(like a text file), how can i make an excepction for that program(even using more exe files)?

cambalinho 142 Practically a Posting Shark

i installed a worked driver.... but the windows 10 update it automatic and now isn't working :(

cambalinho 142 Practically a Posting Shark

"I hope in the future you can make your discussion title match the post content."
ok.. isn't the best title.. but i'm learning more and what i can about windows 10.. because i'm getting some problems using it.
i use these title for next questions about windows 10

cambalinho 142 Practically a Posting Shark

why, on windows 10, some touchpad drivers(even updated by windows) don't activate the vertical\horizontal scrool move.... i have them activated, but don't work.... when i use the finger, instead scrool, the move moves.. yes i have seen the scrool area.
how can i fix the problem?

cambalinho 142 Practically a Posting Shark

i did more 1 or 1 updates for avoid some errors on code line.. that's why i'm sharing it:

void FunctionRules(int &FunctionListIndex, unsigned int &TokensIndex, vector<TokensSimplification> &tokens)
    {
        for(unsigned int parameters=0;parameters<FuncList[FunctionListIndex].ParametersType.size()-1; TokensIndex++)
        {
            if(FunctionListIndex>FuncList.size()-1 || parameters>FuncList[FunctionListIndex].ParametersType.size()-1 || TokensIndex>=tokens.size()-1)
                break;
            else if(tokens[TokensIndex].Description=="," || tokens[TokensIndex].Description=="(" || tokens[TokensIndex].Description==")")
                continue;
            else if(IsNumber(tokens[TokensIndex].Description) && IsNumberType(FuncList[FunctionListIndex].ParametersType[parameters]))
                parameters++;
            else if (tokens[TokensIndex].Type==FuncList[FunctionListIndex].ParametersType[parameters])
                parameters++;
            else if(IsVarName(tokens[TokensIndex].Description)>-1)
            {
                int i=IsVarName(tokens[TokensIndex].Description);
                if(VarList[i].Type!=FuncList[FunctionListIndex].ParametersType[parameters])
                {
                    ErrorList.push_back("Line error: " + to_string(LineError) + " - var type parameter incorrect!!!");
                }
                else
                    parameters++;
            }
            else if(IsFunction(tokens[TokensIndex].Description)>-1)
            {
                int i=IsFunction(tokens[TokensIndex].Description);
                if(FuncList[i].Return!=FuncList[FunctionListIndex].ParametersType[parameters])
                {
                    ErrorList.push_back("Line error: " + to_string(LineError) + " - the function must return the parameter type!!!");
                }
                else
                {
                    TokensIndex++;
                    FunctionRules(i,TokensIndex,tokens);
                    parameters++;
                }
            }
            else if(tokens[TokensIndex].Type!=FuncList[FunctionListIndex].ParametersType[parameters])
            {
                ErrorList.push_back("Line error: " + to_string(LineError) + " - on call procedure '" + FuncList[FunctionListIndex].Name + "', on parameter " +  to_string(parameters) + " the var type parameter is incorrect '" + tokens[TokensIndex].Description + "' !!!");
            }
        }
    }
cambalinho 142 Practically a Posting Shark

thank you so much for all to all

rproffitt commented: It's all your work above. +1 +15
cambalinho 142 Practically a Posting Shark

finally i fixed the error: before i call the 'FunctionRules' i must add these line:

TokensIndex++;

or that 'if's' can call the function again(on a infinite loop)... and i must do the same on 'FunctionRules' too:

void FunctionRules(int &FunctionListIndex, unsigned int &TokensIndex, vector<TokensSimplification> &tokens)
    {
        for(unsigned int parameters=0;parameters<FuncList[FunctionListIndex].ParametersType.size()-1; TokensIndex++)
        {
            if(FunctionListIndex>FuncList.size()-1 || parameters>FuncList[FunctionListIndex].ParametersType.size()-1 || TokensIndex>=tokens.size()-1)
                break;
            else if(IsNumber(tokens[TokensIndex].Description) && IsNumberType(FuncList[FunctionListIndex].ParametersType[parameters]))
                parameters++;
            else if (tokens[TokensIndex].Type==FuncList[FunctionListIndex].ParametersType[parameters])
                parameters++;
            else if(IsVarName(tokens[TokensIndex].Description)>-1)
            {
                int i=IsVarName(tokens[TokensIndex].Description);
                if(VarList[i].Type!=FuncList[FunctionListIndex].ParametersType[parameters])
                {
                    ErrorList.push_back("Line error: " + to_string(LineError) + " - var type parameter incorrect!!!");
                }
                else
                    parameters++;
            }
            else if(IsFunction(tokens[TokensIndex].Description)>-1)
            {
                int i=IsFunction(tokens[TokensIndex].Description);
                if(FuncList[i].Return!=FuncList[FunctionListIndex].ParametersType[parameters])
                {
                    ErrorList.push_back("Line error: " + to_string(LineError) + " - the function must return the parameter type!!!");
                }
                else
                {
                    TokensIndex++;//avoiding the infinite loop
                    FunctionRules(i,TokensIndex,tokens);
                    parameters++;
                }

            }
        }
    }
cambalinho 142 Practically a Posting Shark

finally i did the function:

void FunctionRules(int &FunctionListIndex, unsigned int &TokensIndex, vector<TokensSimplification> &tokens)
    {
        for(unsigned int parameters=0;parameters<FuncList[FunctionListIndex].ParametersType.size()-1; TokensIndex++)
        {
            if(parameters>=FuncList[FunctionListIndex].ParametersType.size()-1 || TokensIndex>=tokens.size()-1)
                break;
            else if(FunctionListIndex>FuncList.size()-1 || parameters>FuncList[FunctionListIndex].ParametersType.size()-1)
                break;
            else if(IsNumber(tokens[TokensIndex].Description) && IsNumberType(FuncList[FunctionListIndex].ParametersType[parameters]))
                parameters++;
            else if (tokens[TokensIndex].Type==FuncList[FunctionListIndex].ParametersType[parameters])
                parameters++;
            else if(IsVarName(tokens[TokensIndex].Description)>-1)
            {
                int i=IsVarName(tokens[TokensIndex].Description);
                if(VarList[i].Type!=FuncList[FunctionListIndex].ParametersType[parameters])
                {
                    ErrorList.push_back("Line error: " + to_string(LineError) + " - var type parameter incorrect!!!");
                }
                else
                    parameters++;
            }
            else if(IsFunction(tokens[TokensIndex].Description)>-1)
            {
                int i=IsFunction(tokens[TokensIndex].Description);
                if(FuncList[i].Return!=FuncList[FunctionListIndex].ParametersType[parameters])
                {
                    ErrorList.push_back("Line error: " + to_string(LineError) + " - the function must return the parameter type!!!");
                }
                else
                {
                    FunctionRules(i,TokensIndex,tokens);
                    parameters++;
                }

            }
        }
    }

these function test all function parameters and if the variable is the parameter type.
on these function i have 1 memory leak... maybe i'm calling it more that i thot, but i don't know. can anyone advice me?

cambalinho 142 Practically a Posting Shark

when i create a function, and test if theres any error, the function name is added on vector of a structor.
if the function have parameters i add them on another vector on same structor.
i have 2 functions:

struct FunctionList
    {
        string Name;
        string Return;
        vector<string> ParametersType;
    };

vector <FunctionList> FuncList;

struct VarSimplification
    {
        string Name="";
        string Type="";
        string Value="";
        bool Const=false;
        bool Pointer=false;
        int Scope=0;
    };
vector <VarSimplification> VarList;

int IsVarName(string VarName)
    {
        for(unsigned int VarListIndex=0; VarListIndex<VarList.size(); VarListIndex++)
        {
            if(VarName== VarList[VarListIndex].Name)
            {
                return VarListIndex;
            }
        }
        return -1;
    }

int IsFunction(string FunctionName)
    {
        for(unsigned int FunctionListIndex=0; FunctionListIndex<FuncList.size(); FunctionListIndex++)
        {
            if(FuncList[FunctionListIndex].Name==FunctionName)
                return FunctionListIndex;
        }
        return -1;
    }

both of them give me the vector index, if the function\variable was created.
now see the entire string from a vector string(like a function call):

function1 (var1, var2)
  • i can test if the function was created;
  • i can test if the var1 and var2 variables was created;
  • i can test if the var1 type is igual to parameter1 type.
    these is the simple string, just testing variables.
    but instead use variables we can use functions:

    function1 ( function2 ( ) , function3 ( parameter1 ) , parameter3 )

and these is more complex for test the entire line.
so what you can advice?
i belive, doing these topic i had some ideas, i must create a function for test all function parameters..... if the next parameter is a function, then i …

cambalinho 142 Practically a Posting Shark

i'm sorry.
my loops must:
1 - test if that functions\variables was created;
2 - if that parameters types are combined with variable\functions types.
but i need create a loop for eatch function and test their parameters types with variables\functions types

cambalinho 142 Practically a Posting Shark

the question seems simple, but isn't.
think that i have the functions list and it's parameters and the variables on vectors(inclued it's types.. it's a structure).
now see these string(yes i have the words\operators count):

function1 ( function2 ( ) , function3 ( parameter1 ) , parameter3 )

the count, in these sample, is 13.
like you see i have a function, these function have parameters... these parameteres have functions and variables.. that functions can be another functions(nested functions).
these sample is like a nested functions call.
my question is: how can i create a nested loop for control all functions and parameters(if the functions\variables exist)?
like i said, i have the functions\variables names and it's parameteres on a vectors(i have 1 vector for functions\procedure and parameters(names and types and the return type) and other vector for a variables(name and type)
Happy Christmas to all

cambalinho 142 Practically a Posting Shark

the last function, i belive, have a memory leak... so heres the new one

void read()
{
    //wait if the eneter key is pressed:
    cin.get();
}

template<typename first_t, typename... rest_t>
void read(first_t &first, rest_t... rest)
{
    std::cin >> first;
    read(rest...); //function is recursive
                    //when the parameter pack becomes empty
                    //read(); will be called with no parameters
                    //which is why we declare it above
}

void read(string &parameter)
{
    std::getline (std::cin,parameter);
}

void read(char *parameter)
{
    cin.getline (parameter, 256);
}

by the way: heres the write:

void write()
{
    //nothing
}

template<typename first_t, typename... rest_t>
void write(const first_t &first, const rest_t... rest)
{
    std::cout << first;

    write(rest...); //function is recursive
                    //when the parameter pack becomes empty
                    //write(); will be called with no parameters
                    //which is why we declare it above
}
cambalinho 142 Practically a Posting Shark

1st now the mail notification was fastter(maybe something was fixed or something) ;)
happy christmas and happy a new year and thank you so much for all

cambalinho 142 Practically a Posting Shark

finally i found my real problem.
after create the cpp file, the compiler call the header close to the cpp file because of:

#include "Untitled1.h"

i was changing the header file.. but these wasn't changed...
after i copy-paste the file, the problem was fixed.
you have right.. i must change the folder name for not get more surprisers on future.
i'm sorry something and thank you so much for all

cambalinho 142 Practically a Posting Shark

maybe it's possible fix in a different way: can i get the template count parameters?
maybe the read(...) can be called instead the read()

cambalinho 142 Practically a Posting Shark

so why, on Code Blocks, exe(after compile), i press just once the return key... but the exe created with Command Line, must use twices?
i can share the 2 exe(if the moderator let me) for you see

cambalinho 142 Practically a Posting Shark

i even tried these:

void read()
    {
        cin.get();
    }

    template<typename first_t>
    void read(first_t arg)
    {
        cin>>arg;
    }

    template <typename first_t, typename... T >
    void read(first_t starg, T... args )
    {
        read(args...);
    }

i must press enter\return twices :(
what i'm doing wrong on read() (no arguments)?

cambalinho 142 Practically a Posting Shark

but that read() don't use arguments... i don't know control that.
i'm using C++14..
(for use C++17, i must change several code)
what you can advice me more about variadic templates?

  • the read() without parameters is for press enter key;
  • the read(....) with parameters is for read variables.
cambalinho 142 Practically a Posting Shark

i create the read(...) function for read to variables.
but i need too the read()(without arguments) for press enter before continue\exit.

void read()
    {
        //wait if the enter key is pressed:
        cin.ignore();
        cin.get();
    }

    template<typename first_t, typename... rest_t>
    void read(first_t &first, rest_t... rest)
    {
        std::cin >> first;
        read(rest...); //function is recursive
                        //when the parameter pack becomes empty
                        //read(); will be called with no parameters
                        //which is why we declare it above
    }

    void read(string &parameter)
    {
        std::getline (std::cin,parameter);
    }

    void read(char *parameter)
    {
        cin.getline (parameter, 256);
    }

read();

the problem is that i need press, 2 times, the enter for exit...
why these happens?

cambalinho 142 Practically a Posting Shark

i never thot that.. on Command Prompt(CMD.exe) the errors was showed...
i nevert thot that i was doing 1 error between uppercases :(
"C:\Users\Cambalinho\Documents\CB\testfolder\bin\Debug\test2.o: In function main': C:/Users/Cambalinho/Documents/CB/testfolder/bin/Debug/Untitled1.h:335: undefined reference toMain(
std::vector<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::al
locator<std::
cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool)'
C:/Users/Cambalinho/Documents/CB/testfolder/bin/Debug/Untitled1.h:339: undefined reference to `Main(
std::vector<std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::al
locator<std::
cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool)'
collect2.exe: error: ld returned 1 exit status"
yes i get more help to find the real problem.
anotherthing: these string is saved on File:

"write(\"hello world\n\")",

the '\n' will give us a new line on file... for resolve the problem we must add the double slash:

"write(\"hello world\\n\")",

thank you so much for all

cambalinho 142 Practically a Posting Shark

hey i know the command line.
i can create the exe with standard code:

#include <iostream>

int main()
{
   std::cout << "hello world\n";
   std::cin.get();
   return 0;
}

yes.. i have tested and the exe is created..
but if i use my own header file, i get that several errors.
but if i compile the same code, using the Code Blocks, the exe is created...i don't know if Code Blocks is using more commands that show on 'Build Log' view.

cambalinho 142 Practically a Posting Shark

and now the cpp file:

#include "Untitled1.h"
void Main (vector < string > argumentlist , boolean IsOpened ) 
{
    integer a =  20;

    a = a + 30 ;
    write ( a ) ;
    write ( "hello world" ) ;
}

the Code Blocks can compile it.
but if i use Command Prompth\CMD, i will get an object file and these errors:

C:\Program Files\mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin>x86_64-w64-mingw32-g++.exe
-o "C:\Users\Cambalinho\Documents\CB\testfolder\bin\Debug\test2.exe" "C:\Users\Cambalinho\Documents\
CB\testfolder\bin\Debug\test2.o" -static-libstdc++ -static-libgcc -fpermissive "C:\Program Files\min
gw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\x86_64-w64-mingw32\lib\libgdi32.a"

C:\Users\Cambalinho\Documents\CB\testfolder\bin\Debug\test2.o: In function `main':
C:/Users/Cambalinho/Documents/CB/testfolder/bin/Debug/Untitled1.h:335: undefined reference to `Main(
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::al
locator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool)'
C:/Users/Cambalinho/Documents/CB/testfolder/bin/Debug/Untitled1.h:339: undefined reference to `Main(
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::al
locator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool)'
collect2.exe: error: ld returned 1 exit status

i don't understand why these errors... can anyone advice me?

cambalinho 142 Practically a Posting Shark

now i'm testing these code on Untitled1.h:

#include <iostream>
#include <fstream>
#include <windows.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <stdio.h>
#include <vector>
#include <tchar.h>
#include <algorithm>
#include <ctype.h>
#include <iterator>
#include <typeinfo>
#include <sstream>
#include <conio.h>
#define BaseClass :
#define Exit_Procedure return
#define StringNotFound string::npos
#define Add push_back

typedef int integer;
typedef bool Boolean;
typedef void procedure;
using namespace std;

struct size
{
    int Width;
    int Height;
};

using namespace std;

class console
{
public:
    HWND ConsoleWindow;
    HANDLE ConsoleHandle;
    HDC ConsoleHDC;

    operator HWND()
    {
        return ConsoleWindow;
    }

    operator HANDLE()
    {
        return ConsoleHandle;
    }

    operator HDC()
    {
        return ConsoleHDC;
    }

    console()
    {
        ConsoleWindow = GetConsoleWindow();
        ConsoleHandle = GetStdHandle(STD_OUTPUT_HANDLE);
        ConsoleHDC = GetWindowDC(ConsoleWindow);
    }

    void write()
    {
        //nothing
    }

    template<typename first_t, typename... rest_t>
    void write(const first_t &first, const rest_t... rest)
    {
        std::cout << first;

        write(rest...); //function is recursive
                        //when the parameter pack becomes empty
                        //write(); will be called with no parameters
                        //which is why we declare it above
    }

    void read()
    {
        //wait if the eneter key is pressed:
        cin.ignore();
        cin.get();
    }

    template<typename first_t, typename... rest_t>
    void read(first_t &first, rest_t... rest)
    {
        std::cin >> first;
        read(rest...); //function is recursive
                        //when the parameter pack becomes empty
                        //read(); will be called with no parameters
                        //which is why we declare it above
    }

    void read(string &parameter)
    {
        std::getline (std::cin,parameter);
    }

    void read(char *parameter)
    {
        cin.getline (parameter, 256);
    }

    size GetWindowSize()
    {
        PCONSOLE_SCREEN_BUFFER_INFOEX consolesize;
        consolesize->cbSize=sizeof(PCONSOLE_SCREEN_BUFFER_INFOEX);
        GetConsoleScreenBufferInfoEx(ConsoleHandle,consolesize);
        return {(int )(consolesize->srWindow.Right + consolesize->srWindow.Left), (int)(consolesize->srWindow.Bottom + consolesize->srWindow.Top)};
    }

    void SetWindowSize(size newsize)//newaize recive the number of characters been showed on …
cambalinho 142 Practically a Posting Shark

i need speak ;)
everytime that i create a topic, i recive an email... jonh_165 you can test that...
now the notifications can have a delay, but they will be showed... i use hotmail.
anotherthing: when you are login, maybe, you don't recive the notifications...
ok, i'm sepaking by head, but these is more or less what i see.
but Dani has right, the hotmail is more strange for get the mails. i have problems on others pages\forums too. it's a hotmail bug. you can try speak with them for see what that say, but.. i don't know what they will answer and you don't understand more.
Dani do what she can... but somethings aren't from here, but the hotmail 'rules'. i had some problems and she helped me very.
thank you so much for all
hey Happy Chrismas

cambalinho 142 Practically a Posting Shark

after several tries i found the problem: when we use some API functions, we must add the libraries too, or we have errors without notice.

string FileName1="C:\\Program Files\\mingw-w64\\x86_64-7.2.0-win32-seh-rt_v5-rev1\\mingw64\\bin\\x86_64-w64-mingw32-g++.exe";
    run(FileName1,"-Wall -g -std=c++14  -c \"C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.cpp\" -o \"C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.o\"");
    run(FileName1,"-o C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.exe C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.o -static-libstdc++ -static-libgcc -fpermissive \"C:\\Program Files\\mingw-w64\\x86_64-7.2.0-win32-seh-rt_v5-rev1\\mingw64\\x86_64-w64-mingw32\\lib\\libgdi32.a\"");

now i can create an exe that executes without dll's dependencies.
thank so much for all

cambalinho 142 Practically a Posting Shark
void run(string FileName, string Parameters="")
{
    SHELLEXECUTEINFO ShExecInfo;
    ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
    ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
    ShExecInfo.hwnd = NULL;
    ShExecInfo.lpVerb = "open";
    ShExecInfo.lpFile = FileName.c_str();
    ShExecInfo.lpParameters = Parameters.c_str();
    ShExecInfo.lpDirectory = NULL;
    ShExecInfo.nShow = SW_SHOWNORMAL;
    ShExecInfo.hInstApp = NULL;

    ShellExecuteEx(&ShExecInfo);

    if(ShExecInfo.hProcess)
    CloseHandle(ShExecInfo.hProcess);
}
cambalinho 142 Practically a Posting Shark

i'm trying using the GNU compiler with command lines( using the ShellExecuteEx()).
when i do:

string FileName1="C:\\Program Files\\mingw-w64\\x86_64-7.2.0-win32-seh-rt_v5-rev1\\mingw64\\bin\\x86_64-w64-mingw32-g++.exe";
    run(FileName1,"-c \"C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.cpp\"");

the object file is created.
these line creates the exe:

run(FileName1,"-o C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.exe C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.o");

(tested)
but the exe have some dependencies...
so seen the Code Blocks:

x86_64-w64-mingw32-g++.exe -Wall -g -std=c++14  -c C:\Users\Cambalinho\Documents\CB\testfolder\main.cpp -o obj\Debug\main.o
x86_64-w64-mingw32-g++.exe -L"C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86" -o bin\Debug\testfolder.exe obj\Debug\main.o  -static-libstdc++ -static-libgcc -fpermissive  "..\..\..\..\..\Program Files\mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\x86_64-w64-mingw32\lib\libgdi32.a"
Output file is bin\Debug\testfolder.exe with size 2.92 MB
Process terminated with status 0 (0 minute(s), 8 second(s))
0 error(s), 0 warning(s) (0 minute(s), 8 second(s))

the "-static-libstdc++ -static-libgcc" adds the exe dependencies.... but i can't add it correctly.. the exe isn't created :(
can anyone advice me?

cambalinho 142 Practically a Posting Shark

yes changes, we can change the theme and much more and change when the notification messages are showed

cambalinho 142 Practically a Posting Shark

yes it's free. i just actiaved the 30 days for test it

cool: i came here because i recive the mail notification
thanks for all

cambalinho 142 Practically a Posting Shark

yes i'm using that program with 30 free days, maybe after that reinstall it, i can cover the 30 days ;)
please tell me 1 thing: after i answer you, do you recive any mail notification?
what i mean is that i didn't recive a mail notification when you answer me :(

cambalinho 142 Practically a Posting Shark

i'm using Windows 7.
the battery icon is showed on toolbar.
when i move the mouse the percent is showed, but no the time remain... why?

cambalinho 142 Practically a Posting Shark

i'm using Windows 7.
that program can be installed every, depends on user. that's why i need search it's folder
but the time, too, depends if the CPU is busy.
thanks for all to all

cambalinho 142 Practically a Posting Shark

heres my actual code for find\search a folder:

string FindDirectory(std::string FindDirectoryName[2], std::string StartDirectory="C:")
{
    WIN32_FIND_DATA file={0};
    string str=StartDirectory+ "\\*";
    HANDLE search_handle = FindFirstFile(str.c_str(), &file);
    static bool blnFindDirectoryName=false;
    static string strFolderName ="";

    //testing if the folder is valid:
    if (search_handle != INVALID_HANDLE_VALUE)
    {
        do
        {
            //if the folder was founded, then break the loop:
            if(strFolderName!="")
                break;

            //for avoid files names and the folders "." and "..":
            if ((file.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && strcmp(file.cFileName, "..") && strcmp(file.cFileName, "."))
            {
                //cout <<StartDirectory + "\\" + file.cFileName << endl;

                //testing if the folder was found
                //and add it on static strFolderName
                if(string(file.cFileName)==FindDirectoryName[0] && blnFindDirectoryName==false)
                {
                    if(FindDirectoryName[1]=="")
                    {
                        strFolderName = StartDirectory+ "\\" + file.cFileName;
                        break;
                    }
                    else
                        blnFindDirectoryName=true;
                }
                if(string(file.cFileName)==FindDirectoryName[1] && blnFindDirectoryName==true)
                {
                    //MessageBox(NULL, string(StartDirectory+ "\\" + file.cFileName).c_str(), "found it", MB_OK);
                    strFolderName = StartDirectory+ "\\" + file.cFileName;
                    break;
                }
                else
                {
                    //or continue searching:
                    FindDirectory(FindDirectoryName,StartDirectory + "\\" + file.cFileName);
                }
            }
        } while (FindNextFile(search_handle, &file) && search_handle!=NULL);
        //destroy the search_handle:
        FindClose(search_handle);
    }
    //return the search folder full path:
    return strFolderName;
}

//use it:
string File[]={"x86_64-7.2.0-win32-seh-rt_v5-rev1","mingw64"};
    string FileName1=FindDirectory(File);
    MessageBox(NULL,FileName1.c_str(),"hey", MB_OK);

these code works, but sometimes can get 2 or more minutes... is there another faster way?

cambalinho 142 Practically a Posting Shark

i'm sorry, but do youy know how works 'weak' for, maybe, i create my own?
(the virtual functions from base class, on child\derived class, must have a prototype for i define them outside the class... i hate these rule :( )