Computer Science
Member Avatar

I have a simple question about unicode and utf8.

How does a utf8 encoding know what its uppercase encoding is? I understand how utf8 encoding carries its unicode value embedded …

Topic by gerard4143

@deceptikon

That's the point. How does an uppercase function work when its used with utf8? A uppercase function would be pretty simple arithmetic with ASCII values but I fail to …

Computer Science
Member Avatar

I have a simple question about unicode and utf8.

How does a utf8 encoding know what its uppercase encoding is? I understand how utf8 encoding carries its unicode value embedded …

Software Development
Member Avatar

what difficulties most of the beginners in c++ programming student face i guess logic building
** i have a blog about c++ programming for beginners on which i try to …

Topic by fahadmunir32

Or posting in the wrong section?

Software Development
Member Avatar

write a program to enter ten numbers and display the highest using array.

Topic by baid.arham619

I think you are confused. First you write the program and then you post it with any problems you are having.

c++
Software Development
Member Avatar
//header file
#ifndef STRUCT_H_INCLUDED
#define STRUCT_H_INCLUDED
typedef struct curs_valutar
{
    char nume[50];
    float cursul;
    struct curs_valutar* next;
    struct curs_valutar* next2;
}curs_val;

curs_val *head=NULL;

int sc=0;
int n;

int creare(int n); …
Topic by radu.nuconteaza

Ok, which functions and line numbers are you talking about?

c
Software Development
Member Avatar

Let me try to explain a problem I have.I have built array of structures that contains int(num of days) and string(Name).So basicy user should enter name of a friend and …

Topic by nhrnjic6

The solution or hints of a solution depend on which data structures you plan to use. Could you post what you have so far?

c++
Software Development
Member Avatar

I have a problem with registering a new employee for my project.
It can only detect the first employeeID as an existing..
Here's my code:

void registerNewEmployee(){
   FILE *fp;
   struct …
Topic by Pia_1

Shouldn't this

scanf("%s", &employeeIDNew);

be

scanf("%s", employeeIDNew);
c
Software Development
Member Avatar

how % operator worked in c++?
3%5=3;
how?
it should be 0;

Topic by Ahtsham

Well 3 divided by 5 has 3 left over. The modulus operator computes the remainder of integer division.

c++
Software Development
Member Avatar

sds

Topic by Fedoros

I guess you are not aware of our homework policy.

We don't do homework problems.

If you want help with a specific problem then you'll have to post the code …

Community Center
Member Avatar

Once harm has been done, even a fool understands it.
-- Homer

Topic by vegaseat

The difference between a democracy and a dictatorship is that in a democracy you vote first and take orders later; in a dictatorship you don't have to waste your time …

Software Development
Member Avatar

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 …

Topic by CreatorZeus

You can set the delimiter for getline().

istream& getline (istream& is, string& str, char delim);

Please check out this link
http://www.cplusplus.com/reference/string/string/getline/

Software Development
Member Avatar

Hi friends,

I want to implement code which can take input from some other application.
Like say for example

ls | less

Here, less is the application/utility which takes input …

Topic by hemanshurpatel

Can you post your code?

c
Software Development
Member Avatar

suppose there are two strings str1 and str2.
suppose i filled str1 with some characters.Now what i want to do is copying string str2 at some specified location in str1. …

Topic by inspire_all

Do you mean something like this?

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char**argv)
{
    /*make sure str1 is padded with enough room*/
    char str1[] = {'H','e','l','l','o',',',' ','W','o','r','l','d','\0',' …
Software Development
Member Avatar

suppose there are two strings str1 and str2.
suppose i filled str1 with some characters.Now what i want to do is copying string str2 at some specified location in str1. …

Topic by inspire_all

How can i do it?

Depends. Do you want to overwrite the characters or do you want to insert the characters and shift everything down..

Software Development
Member Avatar
// my problem is in the playerscore and computerscore always gives me 0 or 1 
// i cant know who finally won plz i need ur help 
//at the end …
Topic by samer.aboufakher.3

Actually, what is going on here?

void toss(int & x)
//0=heads 1=tails
x=rand()%2;
int result(int a, int b, int c)
{
...
}
c++
Software Development
Member Avatar
// my problem is in the playerscore and computerscore always gives me 0 or 1 
// i cant know who finally won plz i need ur help 
//at the end …
Topic by samer.aboufakher.3

You seem to be missing the opening brace here

void toss(int & x)//missing brace here
//0=heads 1=tails
x=rand()%2;
c++
Software Development
Member Avatar

I'm trying to get a better understanding of ifstream, and was playing with it using the program below. It's purpose was to grab the first and last entries in the …

Topic by mixelplik

Are you sure the datafile is in the same folder as the executable.

c++
Software Development
Member Avatar

I'm trying to get a better understanding of ifstream, and was playing with it using the program below. It's purpose was to grab the first and last entries in the …

Topic by mixelplik

Did you pass std::endl or "\n" to std::cout?

c++
Software Development
Member Avatar

I'm trying to get a better understanding of ifstream, and was playing with it using the program below. It's purpose was to grab the first and last entries in the …

Topic by mixelplik

Try running this program with your data.

#include <iostream>
#include <fstream>

using namespace std;

int main(int argc, char** argv) 
{
    ifstream names;

    names.open("P25.txt");

    string data;

    while(names >> data)
    {
        cout …
c++
Software Development
Member Avatar

WAP to print the sum of all the PRIME or EVEN integers in the array and ignore the remaining.

Topic by roshan.parate.73

Here you go....

#include <stdio.h>

#define ARR_SIZE 10

int main()
{
    size_t i = 0;
    char chr_arr[ARR_SIZE];

    /*populate int_arr*/

    for (; i < ARR_SIZE; ++i)
    {
        if (chr_arr[i] /*meets some …
c
Software Development
Member Avatar
c++

what is C++ mean? and what is the purpose of it?

Topic by girmanigatu

C++ is a play on the C programming language increment operator. C++ literally means C language incremented.

What's the purpose of it? Here check the wiki

http://en.wikipedia.org/?title=C%2B%2B

c++
Software Development
Member Avatar

Which compiler must I use to create ?:

  1. Bare metal utilities.
  2. My Operating System.
Topic by ArnoldRich

Here's some links you might want to read...

http://linuxgazette.net/issue77/krishnakumar.html
http://www.acm.uiuc.edu/sigops/roll_your_own/

c
Software Development
Member Avatar

WAP to print the sum of all the PRIME or EVEN integers in the array and ignore the remaining.

Topic by roshan.parate.73

OK. What have you tried so far?

c
Software Development
Member Avatar

hey guys ! so im learning c, got a question:

so say i have a struct of students and inside the struct is name , id , fatherName, motherName.

like …

Topic by centenond

Yes, you will searching for the element contained in the array std. If you need to search id in the array std then you could loop through std and check …

c
Software Development
Member Avatar

Which compiler must I use to create ?:

  1. Bare metal utilities.
  2. My Operating System.
Topic by ArnoldRich

Well first you have to identify which platform this OS will run on and then you have to brush up on that platform's assembler code.

c
Software Development
Member Avatar

Dear all

Can anyone explain to me how a (local) counter can be modified in a loop without being touched in the code? … and how I am best to …

Topic by MacErich

Could you please give more details?

Software Development
Member Avatar

Which compiler must I use to create ?:

  1. Bare metal utilities.
  2. My Operating System.
Topic by ArnoldRich

I think you can use any compiler which has the ability modify the linker, GNU's compiler has linker scripts which controls this important aspect.

c
Software Development
Member Avatar

hey guys ! so im learning c, got a question:

so say i have a struct of students and inside the struct is name , id , fatherName, motherName.

like …

Topic by centenond

Well this is how you access an element of std[100] and get its elements.

std[searchid].id
std[searchid].name
std[searchid].fatherName
std[searchid].motherName
c
Software Development
Member Avatar

So, I have attached my code below. It worked fine , until I introduced the part to print out what's in the input file. After I did this, it says …

Topic by sixtorodriguez

Try reopening the input file or setting the file position back to the beginning with fseek() on line 22.

DaniWeb Community Feedback
Member Avatar

I'm curious as to where a member would post a question on ML(Ocaml) type language?