C is a general-purpose computer programming language used for operating systems, games and other high performance work and is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system.

learn more… | top users | synonyms

0
votes
0answers
4 views

Writing a text in a QPixmap

I'm having what is follow: QLabel* label_PM= new QLabel(this); QPixmap PM ("C:/PM.jpg"); label_PM->setPixmap(PM); I would like to insert to the PM a text like what is done in OpenCV cv::putText. ...
0
votes
2answers
41 views

Counting how many times a word is in a file

I'm trying to write a program that gets a string, and counts how many times that string is found in a specific file. The file is currently: hello my name hello is oria I like hello to program And ...
-3
votes
1answer
30 views

How to read and use data from CSV files?

I have CSV files that contain 2 columns of x and y coordinates, that are the positions of particles. I want to read these files and be able to use the data inside to calculate a function (I mean I ...
-1
votes
0answers
29 views

how to fectch c or c code from a .c or .cpp file in html page and then do syntax highligthing of the fetched code

how to fetch C or C++ code from a .c or .cpp file in HTML page and then do syntax highlighting of the fetched code. I am able to display the contents of .c file in HTML page, but I also want to ...
0
votes
2answers
33 views

C equivalent of PHP `date('YmdHis')`

couldn't find an answer on google. Is there an equivalent in C for PHP date('YmdHis') output: 20130613153516 Thank you!
-4
votes
1answer
72 views

Why a[v] = v[a]? [duplicate]

v it's an array of ints and a it's an int: #include <iostream> using namespace std; int main() { int v[10], a; cout << v[a] << endl; cout << a[v] << endl; return 0; } ...
-1
votes
1answer
67 views

optimize a c code on nested loop

I have the following code for(i=0;i<16;i++) for(j=0;j<16;j++) { in=(i+u*j+rl+rc)&15; jn=(v*i+(u*v+1)*j+rc)&15; x1[i*16+j]=x2[in*16+jn]; } some notes: rl,rc,u, ...
-7
votes
0answers
98 views

Why C/C++ is bad idea [closed]

I have read many times and heard lot many people saying, 'C with Classes is bad idea.'. I know C and C++ both, most of the thing in my project we are doing using C, but to manage complexity of some ...
0
votes
5answers
34 views

C split string into token by delimiter and save as variables

I want to split a string into tokens and save data into variables. I have the following string: John|Doe|Melbourne|6270|AU I need to split it by | and every token keep as variable so I can use them ...
1
vote
3answers
62 views

Regarding initialising pointer variables

In C, these statements: char *c={'q','w'}; and int *c=123; both give error/warning for the fact that initially c will be holding any garbage value and by assigning value directly to that ...
2
votes
2answers
27 views

Warnings when creating a singly linked list with arrays

#include <stdio.h> typedef struct { int data; struct node *next; }node; void print(node *head) { node *tmp = head; while (tmp) { printf ("%d ", tmp->data); tmp = ...
1
vote
1answer
35 views

recv() error C/C++ socket programming

I'm writing the CWMP client for TR-069 Server. I'm basing my client's code on this topic (there's also a source code link in the topic) CWMP CPE (Client) implementation I have encountered a weird ...
0
votes
2answers
47 views

bytes to bytes sending with TCP socket

I have a server which contacts another server for retrieving a file requested by the client. The request process is: Client ----> Server A ----> Server B The process of sending file: Server ...
0
votes
0answers
25 views

Sequential read and write on ssd

How can I determine whether the file being read or written are in sequence. Further is there any way to know whether the files written on flash drives are in sequential order. Assume the flash drive ...
0
votes
3answers
55 views

C : why does only some literal strings crash my program? [duplicate]

I tried the following program: #include <stdio.h> char s1[] = "Global String"; char *s2 = "Another Global String"; main() { char s3[] = "Local String" ; char *s4 = "Another Local ...

1 2 3 4 5 6569
15 30 50 per page