174 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for soujanya.bhat.184

Hi all, I was wondering how to access individual elements in the below case: char *three=(char*){'2','5','8'}; If the assignment were like this: char *three="258"; it can be accessed with three[0],three[1].....etc. How to access in the first case?

Member Avatar for rubberman
0
177
Member Avatar for bananacat

Hi. I'm using 3 classes: the Character class, the Scanner class, and the Test class. This is the Character class: public class Character { private char cargo = '\u0007'; private String sourceText = ""; private int sourceIndex = 0; private int lineIndex = 0; private int columnIndex = 0; public …

Member Avatar for rproffitt
0
346
Member Avatar for exoruel

Good day everyone! I have the codes for such a problem where, to create a program that counts how many times the second string appears on the first string. Here it is: #include <iostream> #include <conio.h> using namespace std; int main () { char first [100], second; int count; cout …

Member Avatar for exoruel
0
364
Member Avatar for davecoventry

Forgive me if this is somewhat basic. If have an array of 20 strings defined: char const commands[20][20] = {// each command string will have a maximum of 20 chars. "quit", "open", "save", "close" }; I want to test the command value to see what action should be taken. int …

Member Avatar for NathanOliver
0
300
Member Avatar for prerit

Hello all!Im trying to write a program that accepts a string from users and then converts each character in the string to its corresponding 8-bit binary code and store it for further manipulation on obtained bit. I have the following code but it is not executing as expected : #include …

Member Avatar for deceptikon
0
324
Member Avatar for Lethugs

Hi, Im making a simple program which converts a encrypted text file the upload it to sql CE. This is time in and out logs of every employee. The date is extracted from a machine and downloaded as encrypted file. We managed to decrypt it by getting the equivalent value …

Member Avatar for Lethugs
0
327
Member Avatar for MasterHacker110

Hello, I have this program that will check and see if the email address the user entered contains valid characters and the @ and . character. The only problem is that my program isn't working... When I enter a valid email address it says it is invalid, when I enter …

Member Avatar for Mya:)
0
5K
Member Avatar for Stefan_2

I need a way to print(and later on compare - but for now just print) characters 2 by 2 as in: I have a string of 1F190307091810 and I have to print out: 1F 19 03 04 09 18 10. I need this for Baudot code(I have segments of code …

Member Avatar for Stefan_2
0
349
Member Avatar for bejfake

Hi, I start with code: int main() { Dict d; int n; std::cin >> n; char word[100]; for (int i = 0; i < n; i++) { std::cin >> word; d.addWord(word); } d.addWord("dog"); d.addWord("drog"); .... return 0; } I don't know why when I call method addWord manually, i.e. calls …

Member Avatar for bejfake
0
229
Member Avatar for Andriy_1

Hello. can You help me with my program. I have to enter two lines from the keyboard, and in the third line program must write the same words from the first two lines. I also can use standart Pascal functions. But in this code I use my own function and …

Member Avatar for SalmiSoft
0
236
Member Avatar for DS9596

What's the difference between: int once; cout << "ok"; and this: char twice; cout << "ok"; Is the output for the first one just ok and the second one ok ok ?

Member Avatar for Ancient Dragon
0
399
Member Avatar for HacruLeian

i have a .csv file contain some name as below: William Shakespeare charlie chaplin david Copperfield and i'm supposed to write a java program that will turn the input above into the output below: WS cc dC but i still couldn't get the output that i want, i wanna ask …

Member Avatar for HacruLeian
0
1K
Member Avatar for essuku

Hi, Is there any java functions are availble to find mostly repeated characters in string ? Thanks

Member Avatar for C-Money
0
196
Member Avatar for Isabella Angeliese

Hi! I have just started on c++ and have encountered Expression: (unsigned)(c+1) <=256 Error when I am trying to run the program. The program is suppose to generate an array of letters (lowercase and uppercase) of size from 15 to 25. After the generation, using ONLY one while-loop, try to …

Member Avatar for Ancient Dragon
0
796
Member Avatar for Pyler

I'm trying to implement a hangman game using linked lists but not getting anywhere. I want guessed characters to be inserted in a Linked list of chars at a position that corresponds to the character's position in the word they are trying to guess.(See example at bottom.) For some reason …

Member Avatar for JamesCherrill
0
2K
Member Avatar for matt55284

Just started learning c++ and ive got a bit stuck :L Im making a console application that injects a file into a process. The file name and process name are both specified at the start of the code using char FileToInject[] = "File_Name.xxx"; char ProcessName[] = "Process_Name.exe"; The console works …

Member Avatar for rubberman
0
350
Member Avatar for blue_Student

I don't know what's wrong but the succeeding strings are not properly read by fgets. else { initArray(word1); //first string fgets(word1, 29, fileIn); printf("word1: %s\n", word1); len = strlen(word1); if(word1[len-1] == '\n') word1[len-1] = '\0'; while(!feof(fileIn)) { //succeeding strings in next line initArray(word1); fgets(word1, 30, fileIn); printf("word1: %s\n", word1); len …

Member Avatar for Ancient Dragon
0
283
Member Avatar for blue_Student

Hi, I've been testing about converting infix to postfix expression. I've made the code and it compiles. My problem is it stops working when I run it. This involves the use of stack and arrays. I just call the method polish to get the strings infix and postfix, and to …

Member Avatar for deceptikon
0
349
Member Avatar for gruntler

I am trying to make a program that generates source code for a much larger program for simple reversal encryption. I don't know what I am doing wrong. Here is my code so far: #include<stdio.h> int main() { FILE *fp; fp=fopen("d:\\crypt.h", "w"); fprintf(fp, "char out[8];char cur[8]; char con[255,255,255,255,255,255,255,255];/n if cur==con …

Member Avatar for gruntler
0
382
Member Avatar for CreatorZeus

okay i have a file with data orgainzed like this in a dat file to be read: apple.0.0.end. and i want it to be read by char until it sees "." then print that, then read again repeated until the end of the line. so i can show the data …

Member Avatar for deceptikon
0
254
Member Avatar for davy_yg

What's the difference between char and varchar in phpmyadmin ? I am trying to decide whether to use char or varchar for name for example.

Member Avatar for RomelynCastillo
0
264
Member Avatar for matt.harding.14203

I have a 8 digit number that is an int, and would like to know if there is an equivalent method that i could use on it like charAt(). or a way to take just one digit out so that it is still an int value and be able to …

Member Avatar for 1stDAN
0
371
Member Avatar for matt.harding.14203

In the following piece of code i am trying to enter a 8 digit binary number then manipulate each digit seperatly. import java.util.Scanner; public class binCoverstion2{ private static Scanner kbd = new Scanner(System.in); public static void main (String[] args){ int bit0, bit1, bit2, bit3, bit4, bit5, bit6, bit7, decNumber; System.out.println("Enter …

Member Avatar for JamesCherrill
0
248
Member Avatar for shiva.shrestha.393

i have a problem with how to use c programming keywords while doing programming can you post me some solutions with these keywords as with their uses and meanings.

Member Avatar for deceptikon
0
277
Member Avatar for themenucha

Hi! what is wrong with the following function? void foo(*ptr){ char buff[127]; ctrcpy(*ptr,buff); } I know that it doesn't really do something... it's for information purpose only.... Thanx!!

Member Avatar for RickRoss$$
0
247
Member Avatar for EXTRA_RICE

greetings here in saudi arabia.i come in peace.i have a problem in search hope you guys have time answering this. i have a datagrid table a textbox and adodc controller.if i input the characters in textbox i want to see only the characters that i have entered and the other …

Member Avatar for Klahr_R
0
199
Member Avatar for jesskavidja

I have a bit of a baffling problem! I'm writing a tag matcher in XML and whenever I run the below procedure, I get a garbage value after the name of every tag **except for the first one**. When I add the array text to the parameters list, the garbage …

Member Avatar for rubberman
0
294
Member Avatar for saurabh.mehta.33234

I have the following code.According to this the values of pointers p[0] and p[1] remains unchanged since the swap is made to local variables in swap function.Now my doubt is how can I swap the pointers p[0] and p[1] inside the function swap?? #include<stdio.h> int main() { char *p[2]={"hello","good morning"}; …

Member Avatar for Schol-R-LEA
-1
196
Member Avatar for student125

I have to accept user input, a string, into a doubly linked list and print the output reversed and forward. My professor gave us the following program and told us to modify it. However, I cannot figure it out. /* Program to reverse a doubly linked list */ #include <stdio.h> …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for 4fridi

Sir I have a search engine on my website which get input by user and search it for the results and i am storing those keywords into seperate table name keywords, but now a days i m checking that there is a bunch of unknown characters into query strings, i …

Member Avatar for 4fridi
0
1K

The End.