|
Do your own homework, you worthless parasite.
|
|
|
|
|
repati wrote:
if anybody can do it please reply back soon and also let me know how soon they can do and how much it costs.
yup, can do. $1000 US per hour, 10 hours minimum payable in advance. respond in private and i will let you know where to send the cheque or money order. i will start coding when the money is in my account.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Well... yes that certainly is cheaper than I would have quoted...
If a wizard fails to cast an enchantment correctly, is that a mis-spelling?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
hi for all
This is a simple question but I have no idea how I can do this:
How can I read all lines from a file and insert a new line in a specific local?
thanks a lot for all
Alex Cutovoi
|
|
|
|
|
|
Alex Cutovoi wrote:
How can I read all lines from a file...
For MFC, look for CStdioFile::ReadString() . Otherwise, you can use STL, fopen() /gets() , CreateFile() /ReadFile() . Take your pick.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
This is my code:
FILE *pFile;
MessageBox(0, thefile, "Erro", 0);
pFile = fopen(thefile, "r");
if(pFile != NULL)
{
while(!EOF)
{
fgets(linha, 100, pFile);
printf("%s", linha);
}
}
else
{
MessageBox(0,"File cound not be opened", "Error", 0);
}
fclose(pFile);
I think that my code is correct but the file doesn't open, what's wrong?
|
|
|
|
|
Alex Cutovoi wrote:
pFile = fopen(thefile, "r");
If thefile does not specify an absolute path, fopen() will only work if the file is in the same folder as the program itself.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
this is the part where I call my function
int main()
{
AbrirArquivo("c:\file.txt");
return 0;
}
the error persists, what's going on?
|
|
|
|
|
You need to use two backslahes. As it stands, fopen() tried to open a file named c:ile.txt .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
My new code is this:
#include <windows.h>
#include <stdio.h>
int iNotas[7];
void AbrirArquivo(const char* theFile)
{
FILE *pFile;
char linha[100];
pFile = fopen(theFile, "r");
if(pFile != NULL)
{
while(!feof(pFile))
{
fgets(linha, strlen(linha), pFile);
printf("%s", linha);
}
fclose(pFile);
}
else
{
MessageBox(0,"file not found", "Error", 0);
}
}
int main()
{
AbrirArquivo("c:\\file.txt");
return 0;
}
Thanks for help.
The problem remains there, #@$%%%@@#!
|
|
|
|
|
Alex Cutovoi wrote:
fgets(linha, strlen(linha), pFile);
This should be:
fgets(linha, sizeof(linha), pFile);
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi all
Article "A light-weighted client/server socket class in C++" explains how to make a client/server application, but i am a beginner and want to know if there are tutorials out there that are simple to use and that explains, step by step, how to create the server application and the client application.
The apps should use sockets and be as simple as possible (basically just be able to wait for a request (server) and then send an acknowledgement to the client (just a basic text message). it should really only illustrate the basic phases: 1) idle(server waiting for a connection), (2)connection establishment, (3)data transfer, (4)termination.
I know that you need the ip address as well as well as a port for communication - but that is basically all i know
if there is anyone who can help by writing a basic program (or tutorial), or even refering me to websites (one for beginners, as all the websites i find are a bit advanced and confusing for the novice C++ network programmer), I would most certainly appreciate it.
thank you.
|
|
|
|
|
I used to code more when i was in a programing class in college, recently i have started to try again. Problem is every time i write code i get the "Fatal Error C1010: unexpected end of file while looking for pre-compiled header directive" (I'm using visual studio.net) I know the code is supposed to work, i copy and pasted it off a website tutorial, and to even check I went to /another/ tutorial and tried their version, also same issue. Is something wrong with my library? What can i do to fix this?
-Thanks a lot
Brandon
|
|
|
|
|
Add #include "stdafx.h" to the top of your .cpp file.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I am interested in getting a static text control to change when a user of a particulat status logs into my app.
So currently say the text is "Hello Operator", i would like that to change if a Technician logs in to say "Hello Tech". Not sure which function in the static text control will do this for me.
Also, i would like to hide a check box control if a different type of user logs in. I am not sure which function accomplishes hiding the control dynamically.
Thanks,
|
|
|
|
|
LCI wrote:
Not sure which function in the static text control will do this for me.
CWnd::SetWindowText
LCI wrote:
Also, i would like to hide a check box control
CWnd::ShowWindow
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I used the "ShowWindow(SW_HIDE)" but that did not work. Is there something that i am not doing?
|
|
|
|
|
I think you've got to create a member variable for that control, and then do something like m_var.ShowWindow(SW_HIDE). I haven't done that for a while, though, so I could be wrong.
Danny
The stupidity of others amazes me!
|
|
|
|
|
Maximilien wrote:
CWnd::SetWindowText
One answer for many
-prakash
|
|
|
|
|
Create a member variable for the static text control. There can be two kinds, either use CString , or CStatic . The function to change the CString variable is simple. For example, say your member variable is CString m_var .
Then,
m_var = "Hello Tech";
UpdateData(FALSE); The UpdateData() function takes the new setting of m_var and makes it display on the dialog. If you used UpdateData(TRUE) it would take the text from the dialog and update the variable. (Note: UpdateData() updates all the variables on your dialog.)
For a CStatic variable, I think you use, SetWindowText(). So...
m_var.SetWindowText("Hello Tech"); Hope this helps!
Danny
The stupidity of others amazes me!
|
|
|
|
|
I am using a static and have pretty much what you suggested but the text does not change. The properties of the static control have text. Upon initializing the app, i check to see if the user type logged in is different from the text already there. If it is, i set the text like above. Is there a property that i have to chnage as well on this static control?
|
|
|
|
|
You created a member variable of type CStatic for the static text control? And when are you doing this initialization? I just ran a quick test myself, changing the text of a static text control with SetWindowText() . I placed it in OnInitDialog() . This worked fine for me.
Danny
The stupidity of others amazes me!
|
|
|
|
|
Change the ID of the control from IDC_STATIC to IDC_STATIC1 then you can create a member variable (e.g. m_st1 ) and carry out operations such as m_st1.SetWindowText("Hello Tech"); .
IDC_STATIC is a special case and all the statics you place on a dialogue will use this so you cannot access the control via that ID.
Elaine
The tigress is here
|
|
|
|
|
Hi
I wish for my user to be able to insert some text into a textbox, by the use of a button
for example, i have a text box, next to it is a button, saying "Insert Name", once
this button is clicked it will update a name into the text box, where the current
cursor position is
Anyone know the best place to start
cheers
si
|
|
|
|