158 Topics

Member Avatar for
Member Avatar for SIFA

Can someone show me a sample code in c which can read in a user inputted sentence/line and then split that line down by white spaces into separate words please? I shall worship you as my new God if someone out there can just show me a sample solution.

Member Avatar for L7Sqr
0
127
Member Avatar for Mal-man

Stuck on a program i've been trying to work on for the last few hours. A user enters 2 arrays, both are charater arrays with 5 spaces each. They are passed into a function that compares the 2 arrays to each other [I]character by character[/I]. If they are idenital the …

Member Avatar for darkdai
0
7K
Member Avatar for mangopearapples

Hey guys, I'm having a little bit of trouble here. I have a variable called Latest1 and it's value is some HTML and PHP code. I have a function that does document.getElementById().innerHTML = Latest1; So when that happens, it runs the HTML code but for some reason it doesn't run …

Member Avatar for mangopearapples
0
216
Member Avatar for Razzo1

Well I am coding a small intermediate program to help me with learning c++ , and i am wondering how to check for blank input to cin >> string heres what i have [CODE]string name; cout << "Enter You're Name: "; getline(cin, name); [/CODE] and if i just hit enter …

Member Avatar for mike_2000_17
0
2K
Member Avatar for Harley_Quinn

Allrite so I'm writing this program - and I've been having some trouble with it - there are three parts to it 1. Write a function [CODE]void tolower(char* s)[/CODE] that replaces all uppercase characters in the C-style string s with lower case letter. - Two helper functions to use a)[CODE]bool …

Member Avatar for jonsca
0
177
Member Avatar for francisp94

I'm kind of new to C++ and this forum so forgive me if i look dumb. :icon_cheesygrin: So my program is basically knowing what category is the book inside the "input.txt" using the Dewey Decimal System and displays it in "output.txt It's working fine at the moment. But now it …

Member Avatar for francisp94
0
135
Member Avatar for Gribouillis

This snippet defines a function [icode]a2bits[/icode] which converts a characters string to a string of 0's and 1's showing its bitwise representation.

Member Avatar for Gribouillis
0
2K
Member Avatar for bensewards

Hey everyone, In my COMP 208 class, I was asked to do the following: "Redo Lab 2 Problem 2, only this time use vectors to hold the names and gpa’s instead of arrays. So you will work with 2 vectors, one holding the gpa’s (type double) and the other holding …

Member Avatar for user422
0
197
Member Avatar for Poopster01

If you read the Prologue section of the code I posted it will give you an explanation of what I am trying to accomplish with this program. The problem I am having is that I am unable to find an example of how to pass an argument through the string …

Member Avatar for Akill10
-1
323
Member Avatar for RodEsp

Hey guys, so I'm trying to write a little program that will put together any number of strings passed to it into a single string and then print out that string backwards. I think I have everything correct but I keep getting a "Segmentation fault (core dumped)" error after compiling …

Member Avatar for RodEsp
0
1K
Member Avatar for Scooterman1

So I've been working on a program that takes a string and then puts it in an i * 6 char array but I can't seem to get it to work, any help with the problem would be much appreciated. Here is the unsatisfactory code I have so far: [CODE] …

Member Avatar for Scooterman1
0
375
Member Avatar for Mayank23

how can a user be able to type what ever he wants such as " i went to the park...", i tried to do it but with my string variable it only read the first word typed in, such as i in this case. please help.

Member Avatar for Mayank23
0
165
Member Avatar for Mayank23

how would be able to display all the names a user entered. the user entered the names through a while loop

Member Avatar for alaa sam
0
105
Member Avatar for saveme123

How do you write a method that switch a space " _ " with a letter, the example my teacher gave us to work with is: [CODE]public static int seqSwapSearch ( int[] list, int item) { int location = -1; int temp; for (int i = 0; i < list.length; …

Member Avatar for code learner
0
88
Member Avatar for RenanLazarotto

hey guys! how can I read strings from a file? Like... They will compose part of the interface... something like, read a string from a file, then this string points to a image that will be used in a picture box, as same as a label that will be shown …

Member Avatar for RenanLazarotto
0
129
Member Avatar for Ruko

How do I replace 63 strings in a .sql via php. Im making a multiforum software and I can't figure this out.

Member Avatar for R0bb0b
0
62
Member Avatar for rotexhawk

Alright.. Seems I wasn't able to fully explain my problem.. Below is the full error printout. I tried debugging it and I still don't know why guessed[index] = (letter) gives me an error. I don't want to use the append method because it will put the new letter at the …

Member Avatar for rotexhawk
0
339
Member Avatar for Castiel1631

I am creating an abstract data type for strings implementing the string functions but not using the string library. I have my .c file and my .h file below. The problem seems to lie in addMystring I have commented out the area's that seem to have the problem. when they …

Member Avatar for Castiel1631
0
2K
Member Avatar for bkoper16

I need help with a program that is supposed to take data on football players from a txt file and place them in a binary search tree then use case statements to t osearch the tree inorder, preorder and postorder recursively here's what i got so far [CODE] /* Bradley …

Member Avatar for Narue
0
185
Member Avatar for Bardan Jusik

Hello! I need to write a program to find whether a word is a palindrome or not. What differentiates this from the other palindrome threads in this forum is that I can only use certain functions. They are: If statements, string functions (to upper, to lower, indoxof, length, substrings), for …

Member Avatar for Bardan Jusik
0
282
Member Avatar for patrickgormally

I am reading a text file inside Python that contains salaries and the raise they will receive as a percent. I am trying to multiply the initial salary by the percent and print the salary after the raise has been applied. I keep receiving an error message which is as …

Member Avatar for patrickgormally
0
3K
Member Avatar for bkoper16

I am doing a project where i have to insert a list of players and stats into a binary search tree Here is the project description For this final assignment, you will be creating a binary search tree. You will be able to utilize some of your previous assignment code, …

Member Avatar for bkoper16
0
874
Member Avatar for arineon

I am trying to come up with my own code for strcat. This is what I have so far. I'm getting a segmentation fault and i can't figure out why. The function prototype and call must not change. Any suggestions? [CODE]//Function Protoype char* stringCat(char *pWord, char *pTemp); //Function call in …

Member Avatar for darkbreaker
0
144
Member Avatar for Rez11

Palindrome detector. Palindrome is any word/sentence/phrase that reads the same foreword and back. I'm in the middle of creating a program that accepts a sentence, phrase, or word. Then checks to see if it's a palindrome, I'm just having trouble on what to pass to my function. The function must …

Member Avatar for Rez11
0
126
Member Avatar for adanaz

Hi guys I'm trying to take a user input (name) and replicate the input in other methods. Can anybody help? Here is the code: [CODE]import javax.swing.JOptionPane; public class example { public static void main (String[]args) { entername(); } public static void entername() { String a=""; a = JOptionPane.showInputDialog("Welcome. Enter name …

Member Avatar for adanaz
0
955
Member Avatar for neocortex

Hello! I wonder if anyone used google-diff-match-patch for fuzzy string comparisons, i.e., for finding a closest/most similar string? Can anyone explain and give some examples? Also, in genera, what would be the best matching algorithm in Python. I tried Levenshtein, but matches are not so good, and I tried difflib.get_close_matches …

Member Avatar for Neil Fraser
0
1K
Member Avatar for mommabear

[B]Specifications (minimum):[/B] The CDROM class contains the following, private, data members: string Name; // The Name of the CDROM string CDType; // The Type of CDROM float Cost; // The Cost of the CDROM [I]The ONLY recognized (i.e., legal) CDROM types are, “Game”, “Word”, “Compiler”, “Spreadsheet”, “Dbase”, and “Presentation” (AND, …

Member Avatar for mitrmkar
0
148
Member Avatar for Bombshock

Hey Daniweb, I'm starting out learning python and have been looking around and saw the thread on printing a line that starts with a specific word, I would like to create something similar except take numbers out of text and print them so I can graph them. So far I've …

Member Avatar for TrustyTony
0
144
Member Avatar for Kromletch

I am working on a C++ program that wants me to read in 52 unsorted states. All the states have randomly Capitalized letters.The objective is to sort the states in alphabetical order by the last letter of the state. Case sensitivity is the least of my problems but i am …

Member Avatar for Fbody
0
268
Member Avatar for Sandhya212

Hi, My requirement is to identify '-' in string1 and delete those corresponding locations in string2. The logic I am implementing is that 1. find the locations in string1 where '-' occurs 2. At these locations, insert spaces in string2 and then 3. have string2 without spaces. I managed to …

Member Avatar for TrustyTony
0
120

The End.