158 Topics

Member Avatar for
Member Avatar for ZZMike

This is Python 3.4.2 The documentation says that s2 = s1.strip('a') will strip out all the 'a' in s1. When I run it, only the leftmost character - and only if it is 'a' - is stripped. The default s2 = s1.strip() takes out all whitespace. PS: I understand that …

Member Avatar for tinstaafl
0
13K
Member Avatar for Mudzy

im stuck on a question from the book, java in 2 semesters chapter 7. 2a) write a program that asks the user to input a string, followed by a single character, and then tests whether the string starts with that character. [CODE]public class StringTest { public static void main(String[] args) …

Member Avatar for JamesCherrill
0
15K
Member Avatar for JosesMelo

Hello, Is there any limitation for the length of array variables in C++? Can I specify the length as wanted or is there any limitation for the array length? What should be the array length, if the length is not known. wchar_t commandString[10000]; Cheers

Member Avatar for rubberman
0
284
Member Avatar for JosesMelo

Hello, I have 2 **wstring** variables: std:wstring first =L"Jose"; std:wstring second = L"James"; How can I combine these variables: first + second gives an error in Visual Studio. Cheers

Member Avatar for rubberman
0
4K
Member Avatar for Muhammad_102

Hy Guys,I Need Your Help Regarding This Question.. I run this Program on Dev c++ and Compiler did not Show Error but During INput I can not input Name and Address in both student class and School Class.. Sorry For bad English.. :) #include<iostream> #include<string.h> #include<fstream> using namespace std; class …

Member Avatar for 2teez
0
231
Member Avatar for khaled02

Hi, I hope you can help me out of this because i really dont understand how to fix this code anymore, i tried and tried and it don't work. When i debug this code in Microsoft Visual Express 2010, it says the following erros are: 1>------ Build started: Project: Adreesbook2, …

Member Avatar for khaled02
0
233
Member Avatar for queenofdrama365

JAVA How to read in strings from a file convert to byte code (unicode) and save in array for hashing? how to use hashing (using list of strings) to find longest chain? (from text file dont print the output in a file just dislplay.)

Member Avatar for JamesCherrill
-1
179
Member Avatar for ThePlacid

Hello, i need help with my project. Im making a program that encrypts and decrypts the contents of a text file. I had to generate an 8 character key which is converted to ascii and then calculate the offset factor of the key that was generated (New every time program …

0
207
Member Avatar for chubbyy.putto

I know I should have try it first but I dont understand what is this asking about. My english is my very bad. Can you please telling in easy english. PLus this is very confusing. Please help me out Write a BNF grammar for the for statement of C. Assume …

Member Avatar for sepp2k
0
682
Member Avatar for vegaseat

A little experiment with custom sorting the result of a word frequency count using Google's Go language.

Member Avatar for vegaseat
2
3K
Member Avatar for vegaseat

This time just a simple example of grading scores (0 - 100) with letters (A - F). Two approaches are presented, one using switch/case in an "on the fly" function, and the other uses the score as an index to a string of letters F through A.

Member Avatar for vegaseat
1
793
Member Avatar for AQ

hey guyss..!! I'm having some difficulties working with strings (cstyle, object oriented strings). as this is something new for me so I'm not exactly familiar with functions of strings aswell.. write now i have a question for which i was making a solution but the code is missing something please …

Member Avatar for David W
0
319
Member Avatar for mattyd

Hello, I am currently using bound parameters in regards to user input on my form. I have read about escape strings also and thought of using both together. Is this possible and, importantly, is it necessary considering I am already using bound parameters? I would like to use both. Thank …

Member Avatar for mattyd
0
263
Member Avatar for Papa_Don

Hi Group, I attempting to save a file to a specific folder that is begins with the hotels property number. Currently I've manually listed the properties complete folder name in a text file. This is proving to be a management problem that needs to be fixed. The code I'm using …

Member Avatar for Papa_Don
0
284
Member Avatar for mattyd

Hello. I am beginning the process of coverting all of my MySQL to MySQLi. I have been doing much research on this but find it a bit confusing. I have two questions at this point regarding the matter: 1) What does it exactly mean to "escape" a string and where …

Member Avatar for deceptikon
0
404
Member Avatar for William Hemsworth

Hi, thanks for any help in advance. I was hoping to get some guidance for getting started with connecting to an SQL database online. I'm writing an application in Win32 which needs to be able to read/write to a database. I have plenty of experience with C++, but almost no …

Member Avatar for William Hemsworth
0
344
Member Avatar for Pyler

So I'm trying to remove 2 brackets from lines I'm reading from a file. For some reason when I run my program the characters in between the delimeters is removed. for example `greetings pe()ple` would end up as `greetings pe` I'm using a char array of delimiters. `char delimiters[] = …

Member Avatar for Pyler
0
199
Member Avatar for LucasMNF55

void password(){ string fpass; string pass; cout << "Type the password " << endl; getline(cin,pass); cin.ignore(); ifstream fin(FILENAME1); string str; getline(fin, str); fpass = str; cin.ignore(); if (pass.compare(fpass) == 0){ cout << " Hello!" << endl << endl; cout << "What do you want to do?" << endl; }else{ cout …

Member Avatar for LucasMNF55
0
262
Member Avatar for daniela.valkanova

> The following letters are stored in an alphabet array: B, J, K, M, S, and Z. > Write and test a function named adlet(), which accepts the alphabet array and a new letter >as arguments, and then inserts the new letter in the correct alphabetical order in the array. …

Member Avatar for daniela.valkanova
0
268
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
297
Member Avatar for ms061210

Hi can anyone give me an idea on how I can come out with an output like this: $string = string1-1/string3-3/string3-3/ //this is the original string from DB //i want to split the strings and put it in the array, and the array should look like this Array[0] = String …

Member Avatar for veedeoo
0
286
Member Avatar for ishaan3731

i have this code which tries to enter data into an array of string(char ptr) called token.To do this i have used a while loop to obtain a string as user input and put that string into the token array one by one. But when i try to print the …

Member Avatar for ishaan3731
0
196
Member Avatar for limitx3m

I've been assigned in my class to do this exact same problem: <snip> I'm wondering on how to get started. Any help would be appreciated. I know how to use the functions for c-strings, but I'm not sure if I should place all the contents of the paragraph into one …

Member Avatar for Ancient Dragon
0
290
Member Avatar for Rashmi_1

Hi, I need some help with sorting my string comparison. Bascially what I have to do is this: To have numbers sorted properly even when they aren't justified with leading 0's: 1 2 ... 9 10 Instead of: 1 10 2 ... 9 Also to have numbers sorted properly even …

Member Avatar for Rashmi_1
0
894
Member Avatar for Jason_9

I'm totally new to programming and taking an intro class. When i prompt the user for a state code the program just exits, nothing in my book really goes over this and all im given is crappy youtube videos for reference. Any help is greatly appreciated. #include <stdio.h> #include <stdlib.h> …

Member Avatar for David W
0
247
Member Avatar for daino

Hi I'm having a little trouble understanding C++ string arguments if that's what you call them. The below example illustrates. I'm not sure I understand what line 14 does. The vector 'myvector' is passed to myfunction (called on line 35. I'm assuming string w takes in the first value of …

Member Avatar for daino
0
350
Member Avatar for yann.bohbot.9

I'm new to C and I i have an assignment where I have to build a dictionary (Linked List). Basically the user inputs several words,year and their definitio likn this: Example: > love_#_2004_#_LOVING `trade_#_2001_#_INVEST` etc... Now what I need is to have a function that will scan the definition which …

Member Avatar for yann.bohbot.9
0
347
Member Avatar for yann.bohbot.9

I'm new to C and I i have an assignment where I have to build a dictionary (Linked List in a way). Basically the user inputs several words,year and their definition this: Example: love_#_2004_#_LOVING trade_#_2001_#_INVEST etc... And basically i need a function to scan the definition (Ex: INVEST) and gives …

Member Avatar for yann.bohbot.9
0
229
Member Avatar for yann.bohbot.9

Hi there, I made a linked list program to add, delete, add in the middle and delete from anywhere. I'm searching to make a function to sort the string data that I have in lexicographic order. Here's my struct: struct node { char data[100]; struct node *previous; // Points to …

Member Avatar for Ancient Dragon
0
225
Member Avatar for Yorkiebar14

Hello, I am trying to extract ALL strings between two apostraphes within a given string but for some reason I only seem to be getting the first one. The string I am trying to extract from is: `'1962' '1963' '1964' '1965' '1966'` The code I'm trying to use to get …

Member Avatar for Troy III
0
228

The End.