|
heh, you can always tell when midterms roll around in the introductory C++ classes. The urgency seems to increase by a magnitude of ten .
those were dark days indeed.
|
|
|
|
|
Use two strings, one to hold the previous level and the other to build the output for the new level.
Traverse the previous string one charcter at a time and build the new output string as you go.
Repeat as meny times as needed.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Please review your post. There is no indentation and worse still, the for loop has been truncated. I can probably guess what's missing but you'll get more help if you take some time making your post easier for people to read.
Steve
|
|
|
|
|
Someone was nice enough to write a solution for you in one of your previous posts.
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hi i am using borland for my contact manager application.
Now i have to read all the values from the comma seperated value file. But i am not sure how to achieve this.
The csv file is something like this
Konopelski,Tessa,255,ElphinstoneStreet,Hidworthville,958,Adolfo.Y.Anderson@Amazeworld.edu,388-0896,,,c:\DuffPath\DuffPhoto.jpg,0
Wisozk,Veda,13,Carmel Close,Upmouth,66744,Kristy.A.Boyer@DoughnutOffLine.net,442-1682,,,,0.....etc
Representing First name, last name, house number, street name, town, post code, email, phone n all.
Any or all help would be greatly appreciated.
Thanks a lot
|
|
|
|
|
strtok
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
|
Lookup the strtok() function in MSDN. strtok() is used to split a string based on certain tokens, such as a comma.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
But i am using Borland....
Is this function fine for borland or only MSVC++ and .NET
|
|
|
|
|
AFAIK it is a standard CRT function so it should work with Borland. Try it and find out
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Software_Specialist wrote: But i am using Borland....
Hai dude hows is your new forum going.. Kiddin.. any way strtok function is also available borland under string header file.. you can use http://www.partow.net/programming/stringtokenizer/index.html[^] to read your csv file.. it support your borland compiler!
|
|
|
|
|
My new forum...what do you mean???????????
Ok ill go through the link u mentioned...
|
|
|
|
|
I'd use Boost's Tokenizer[^] library for this.
Steve
|
|
|
|
|
hi
this is program i made it okay
but i want convert all if statment in last programm to the for loop but the user must determine the input or stage to any number he wants okay
there's conditions every a give you b,b give you ab
if the user enter 4 level answer must be
stage 0:a
stage 1:b
stage 2:ab
stage 3:bab
etc...... this is code :
#include
#include
int size;
void main(){
char symbol[10 ];
int level;
int i;
//******************************************************************//
cout<<"ENTER SIZE OF YOUR CHARACTER :";
cin>>size;
cout<<"*ENTER CHARACTER/ALAPHBET : ";
for( i=0;i
{
cin>>symbol[i];
}
//******************************************************************//
cout<<"*ENTER HOW MANY LEVEL YOU WANT : ";
cin>>level;
cout<<endl;
if(level>8)
cout<<"PLEASE ENTER NUMBER BETWEEN 1 TO 8"<
|
|
|
|
|
hi
this is program i made it okay
but i want convert all if statment in last programm to the for loop but the user must determine the input or stage to any number he wants okay
there's conditions every a give you b,b give you ab
if the user enter 4 level answer must be
stage 0:a
stage 1:b
stage 2:ab
stage 3:bab
etc...... this is code :
#include<iostream.h>
#include<string.h>
int size;
void main(){
char symbol[10 ];
int level;
int i;
//******************************************************************//
cout<<"ENTER SIZE OF YOUR CHARACTER :";
cin>>size;
cout<<"*ENTER CHARACTER/ALAPHBET : ";
for( i=0;i<size;i++)
{
="" cin="">>symbol[i];
}
//******************************************************************//
cout<<"*ENTER HOW MANY LEVEL YOU WANT : ";
cin>>level;
cout<<endl;
if(level="">8)
cout<<"PLEASE ENTER NUMBER BETWEEN 1 TO 8"<
|
|
|
|
|
I suggest read a good book about C/C++ or also if you see is helpful for you www.cplusplus.com
|
|
|
|
|
WhiteSky wrote: I suggest read a good book about C/C++ or also if you see is helpful for you www.cplusplus.com
when i learning c++ i used to go there!. but now they have changed the interface! any way happy new year dude
|
|
|
|
|
Thank you Alok
|
|
|
|
|
Hi there,
I need some advice on how to be able to show one of the custom control's scroll bar and hide the other. Both of the custom control has the same class. Apart from that, the 'SetScrollRange' function is located at the OnPaint() in the custom control's class.cpp.
TQ.
|
|
|
|
|
cyn8 wrote: I need some advice on how to be able to show one of the custom control's scroll bar and hide the other. Both of the custom control has the same class. Apart from that, the 'SetScrollRange' function is located at the OnPaint() in the custom control's class.cpp.
is you custom class support ShowWindow
|
|
|
|
|
my custom control has a CWnd base class. Therefore, i believe it does support ShowWindow. Do you have any suggedtionon how to do what i've mention before?
Any suggestions are welcomed. Thanks
|
|
|
|
|
Generally, scroll range should be set when the window/control changes size, not in OnPaint().
If you do it in OnPaint() then your new settings could cause another repaint.
Try changing scroll settings in response to WM_SIZE. If the scroll settings indicate that no
scrollbar is necessary then it will disappear.
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hello every one!
I need help. I need a program which transmit a video from peer to peer via a serial port
please help me.
|
|
|
|
|
Which part are you having trouble with? Video capture? Playback? Serial port communication?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
i am writing a c project using visual studio 6
the programme runs perfectly in debug mode and gives the right output
but when i am trying to execute the program (ctrl+f5) its failed and raise an application error
the instruction at 0x7c9..etc referenced memory at 0x00344..etc the memory could not be "read" .
i know that maybe i have an error in my dynamic memory allocation but how can i find it while its run fine in debug mode .
should i put a print messages in the code !!!!??? (((
thanks .
|
|
|
|