Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~11.8K People Reached
Favorite Forums
Favorite Tags
Member Avatar for tikoti

Hi all, I am currently trying to remove the zeros from a string the code I have tried is as follows but it does not seem to work propperly Dim code code=request("code") 'here there is a string like 0000045 ' I want to remove the zeros Dim c1 c1 = …

Member Avatar for SudoWin
0
154
Member Avatar for anoopvadi

hi, am a novice in programming. i am facing some difficulty in C++ programming, actually i want to read a column of numbers from a text file or an excel sheet and store that in an array so that i can use it for further processing.Plz help me to solve …

Member Avatar for tikoti
0
3K
Member Avatar for tikoti

Hi all! I have a little problem here, I would like the width function in cout applied to all the sucesive outputs. However, it is only applied to the next output only, I mean, with this code I get 0:00:10:20:30:4 1:01:11:21:31:4 2:02:12:22:32:4 3:03:13:23:33:4 4:04:14:24:34:4 5:05:15:25:35:4 6:06:16:26:36:4 7:07:17:27:37:4 8:08:18:28:38:4 9:09:19:29:39:4 and …

Member Avatar for tikoti
0
2K
Member Avatar for tikoti

Hi all! I get the following error while trying to compile this code /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_numeric.h:116: error: must use .* or ->* to call pointer-to-member function in `__binary_op (...)' I am quite stunned because I've used before in a similar way Can any body give me a hint? Thank you in advance! …

Member Avatar for tikoti
0
271
Member Avatar for tikoti

Hi all! I've read forward declaration is much prefered than include in header files mainly because it reduces the compilation time. Other reasons? My particular situation is that all header files that I use are within a namespace. I've seen two different ways for forward declaration in this case: [CODE] …

Member Avatar for tikoti
0
192
Member Avatar for tikoti

Hi all, I am really new in bash scripting and I can't even make simple tasks What I am trying to do is executing a command (ls -l for this example), over a double leap ssh. [CODE] #!/bin/bash ssh -T myuser@entrypoint ssh -T myuser@targetpc<<EOI ls -ltr . exit EOI [/CODE] …

Member Avatar for thekashyap
0
247
Member Avatar for tikoti

Hi all, I have been doing for fun this problem in projecteuler.net. The problem is as follows: +++++++++++++++++++++++++++++++++++++++++ Peter has nine four-sided (pyramidal) dice, each with faces numbered 1, 2, 3, 4. Colin has six six-sided (cubic) dice, each with faces numbered 1, 2, 3, 4, 5, 6. Peter and …

Member Avatar for TrustyTony
0
503
Member Avatar for tikoti

Hi! I am looking for something to compact the clear and push_back in one line... [CODE] std::vector<int> v(3,100); v.clear(); v.push_back(4); [/CODE] I have thought that vector::swap may be usefull for this task but still figuring out how. Any sugestion or idea? Thank you in advance!

Member Avatar for tikoti
0
164
Member Avatar for tikoti

Hi everyone! I know using "system" in c++ is not the best way to develop, however, I need to use it for some specific reason. I have read that it is advisable using before system(NULL) to check if there is a shell available. My question are: When is not going …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for tikoti

Hi everybody! I am trying to use fork() and wait to perform a simple task with c++ but I have noticed that the performance is quite different from what I expected. [CODE] #include <unistd.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int number = atoi(argv[1]); int i; …

Member Avatar for tikoti
0
3K
Member Avatar for taylord69

i have to write a function (dayNumber) that returns the day number in a year for a date that is provided as input data. i cant use const, struct, or loops, it has to be very basic stuff. i have something written but i can figure out how to get …

Member Avatar for taylord69
0
112
Member Avatar for tikoti

Hi all! I am trying to manage and understand dates with c++, but the output that I am having does not help much. Basically I would like to adjust a localtime that can be seen in the string "s_prueba_time" to a UTC time (in my case -2 hours in summer …

Member Avatar for tikoti
0
184
Member Avatar for tikoti

Hi all, I've been working with C semaphores for a while using shared memory (ftok, semget, semop, semctl) and it works perfectly. However, I was wondering wether using these structures all processes are protected against starvation. I have made several tests with nearly 200 processes sharing a binary semaphore and …

Member Avatar for tikoti
0
81
Member Avatar for tikoti

Hi, I am having an issue with a program and I have ended up realizing I don't know how to pass an array as a parameter. It seems that when I do it the arrays length is one inside of the function, even though outside is different. Here is the …

Member Avatar for mrnutty
0
150
Member Avatar for ls3095

[CODE]#include<iostream> #include<cmath> using namespace std; int main() { float user1; float user2; float sum; char choice; for (;;) do { cout<<"Calculator"; cout << "Enter your first number" << endl; cin >> user1; cout << "Enter your function \n"; cout << "+ \n"; cout << "- \n"; cout << "x \n"; …

Member Avatar for WaltP
0
133
Member Avatar for tikoti

Hi, I am trying to comprehend how exceptions work in c++. However I don't understand why a divide-by-zero exception es not caught by a catch. I attach de code to a better a explanation. [CODE] #include <iostream> //#include <exception> #include <string> using namespace std; int main () { int num1, …

Member Avatar for William Hemsworth
0
149
Member Avatar for tikoti

Hi all, I have tried to make a little example of a random number generator for c++. However, as I am quite new in this language I do not know its peculiarities. Here is the code [CODE] //g++ -o ran ran.cpp #include <iostream> using namespace std; int main () { …

Member Avatar for jephthah
0
467