174 Topics
|
|
How would you split an existing string where a chararacter occurs into an array of strings, and store that character in a char? For example, inputting 123a5 would return {123,5} in an array and 'a' in a char. I've confused myself with this. I will greatly appreciate any help. |
|
A string consisting of letters and digits. How do you do that? How do you code that? |
|
Why won't this if statement compile? [CODE]int main1() { char o[15]; cin >> o; if(o == 'oscar') main2(); else cout << "\n\aIncorrect password.\n" << endl; main(); cin.clear(); cin.ignore(255, '\n'); cin.get(); return 0; }[/CODE] I am trying to set a password to access the program |
|
[COLOR="Red"]3.3 - Objects vs Types: Strings, char, int.[/COLOR] Strings used to be an array of char in C-style coding. Now they're objects in C++. Does this mean that int and char are not objects? |
|
[COLOR="Red"]3.1 - ARRAY arguments, char vs int.[/COLOR] It seems you pass a char OR an int to a substring of an array. Does it matter which one? ex: [CODE] char charValue = 5; int intValue = 5; string awesomeArray[9] = {"truck", "car", "boat", "table", "ocean", "cat", "board", "finicky"}; //Both of … |
|
Hello ppl, i want to know if mysql save some text special chars like the \n i have the nl2br() function to tranform \n in to html <br>, but for BOLD or UNDELINE text ? is there a special char saved in to mysql db ? and is posible to … |
|
hello all i have a problem with a "while condition" useing c. my assignment was to create a dynamical array, using malloc. i did that and all worked as it should. the only thing i dont like,is when it asks you if you want to continue, putting in integer. you … |
|
Okay, so I've been looking at this for quite some time. I think I know what the problem is, but my C++ skills are sad a best due to stuff like Java, C# and VB. So, I'm trying to pull information from the registry, and I have no problem getting … |
|
Hi guys. So, i'm suppose to make a translator, here's my form: [URL=http://img213.imageshack.us/i/12081833.jpg/][IMG]http://img213.imageshack.us/img213/6067/12081833.jpg[/IMG][/URL] When i press the middle button i have to check every word from left memo (MEMO1) and insert the translated word in the memo on the right (MEMO2). So my middle button has the following code : … |
|
Well i made another thread but with a different problem but i fix it. but i know how to make textbox allowed chars but is possible with web browsers ? like if f1 - f12 is pressed then nothing happen like nothing have been touch. is possible ? if so … |
|
Hello I am glad to find this site. I have been searching for help with learning C++, to no avil. So my question, which is multi-fold: I have a book from 10 years back or so, ansi compliant, should it work with dev-cpp. Second, I learned the difference between char … |
|
Hello everyone. I'm developing a program where I need to write some data on a FIFO file, and I'm using the command Write() for that. My problem, is that with that command I can't send integers, so I was thinking about Convert them to Char, and then increment them on … |
|
Well ,it may sound a bit preposterous , but i have a pretty weird problem (which i have solved many times , dunno why it isnt working for me this time ) . I have a data file from which i randomly pick up row nos . The data file … |
|
I am making a scientific calculator as an assignment in my class. I am using switch case for all the operators like +-*/ , and I am calling them with a single keyword like '+' for addition and so on. The problem is that when i try to use more … |
|
I'm trying to move one big C++ string (with separators) like one below [CODE] & 12345 & 12345 & 23423 & 90323 & [/CODE] into 3x5 array like one below with the first group of numbers excluded char array[3][5]; [CODE] { '1' , '2' , '3' , '4' , '5'} … |
|
Hello, i need help with a basic code issue, i ave posted the code [URL="http://turt2live.zxq.net/cpp/hoomin.html"]here[/URL] because it is too long to post... The issue occurs in this section of code: ...(more before) void getInput(int num){ char = one[1]; char = two[1]; char = three[1]; char = four[1]; ...(more after) saying … |
|
hi, i am new to c have to write a program to check the shape. I think the error is somewhere at shape= square. I know i can use printf statements but i want it in this format. Can someone help me please? [code] #include <stdio.h> int main (void) { … |
|
Hi, As I'm new to C++, but not to programming, I tried to start simple by reading off value from the registry. I'm talking about standard values such as the processor's name. I made a little function which checked how many processors the user has, that works fine. But I … |
|
i got to do this for my class and i am a total noob! i don't know what to do from this point on. first, i need to use fstream to do this. 3 Tracy 80 91 67 Dana 0 66 44 Scott 50 41 64 Jamie 82 90 87 … |
|
i have this Tracy 80 91 67 and it is read from a file, making it fstream. i want the computer to reconize the numbers and add them and divide them, excluding the name. how do i do it? i can't use fuction so please make it easy. |
|
Hi all! Please somebody explain me how this snippet is working!! [CODE]main() { float a 4.379; char*p; int i; p=(char*)&a; for(i=1;i<=3;i++) printf("%02X",(unsigned char)p[i]); } [/CODE] |
|
#include<iostream> using namespace std; int main() { char name; cout<<"Enter your name.\n"; cin >> name; cin.get(); cout<<"Hello, " << name; cin.get(); } this is what I have.. Very simple program but I cannot get it to work, as soon as I enter two or more letters when debugging, the cmd … |
|
i would like to know the way we can make user enter a number in a menu reply perhaps so that he doesnt have to press the enter key...........i.e. the program automatically proceeds with the give value and doesnt wait for an enter key to be pressed. its easy in … |
|
Hi,I want to convert String^ to Int array or a char array.I am reading numbers from a file in GUI but the StreamReader Reads the Text in a String.I need to convert them to use the numbers. I have tried ToCharArray() function but it doesnt work! this function gives the … |
The End.